moxiecode / plupload

Plupload is JavaScript API for building file uploaders. It supports multiple file selection, file filtering, chunked upload, client side image downsizing and when necessary can fallback to alternative runtimes, like Flash and Silverlight.
http://www.plupload.com
GNU Affero General Public License v3.0
5.63k stars 1.42k forks source link

Upload not works on android wechat #1397

Open dfang opened 8 years ago

dfang commented 8 years ago

on iOS Uploading works very well, but on android wechat within some wifi network,FilesAdded, BeforeUpload, UploadFile and UploadProgressevents triggerd but FileUploaded didn't. there's even no request on server logs, but switch to connect with my iOS hotspot, it works well.

it's really really weird ! here is the config:

webUploader = new plupload.Uploader({
      runtimes        : 'html5, flash, html4',
      browse_button   : pickerId,
      max_file_size   : '10mb',
      url             : uploadUrl,
      flash_swf_url   : '/uploader.swf',
      filters         : [ { title : "图片文件", extensions : "jpg,jpeg,gif,png,bmp" } ],
      file_data_name  : 'file',
      multipart       : true,
      multi_selection : false,
      dragdrop        : false,
      max_retries     : 3,
      multipart_params: { authenticity_token: $('meta[name="csrf-token"]').attr('content') }
    })
suhaotian commented 7 years ago

Same here

viktor-yang commented 7 years ago

+1

suhaotian commented 7 years ago

Hi, guys, Not working in wechat ? Solution is here : https://www.zhihu.com/question/54623070

@colorwin @dfang

viktor-yang commented 7 years ago

@suhaotian I use version 2.3, but I can't find this line:

"image/jpeg,jpg jpeg jpe," +

I find 3.x has this line, but it seem not compatible to my project.

suhaotian commented 7 years ago

@colorwin Here: image

viktor-yang commented 7 years ago

@suhaotian Thanks, I find it.

jayarjo commented 7 years ago

Did adding image/jpg mime-type solve the problem?

jayarjo commented 7 years ago

@colorwin sorry not familiar with wechat is it messaging app? does it use Plupload to upload something?

viktor-yang commented 7 years ago

@jayarjo Yeah, wechat is a messaging app in China, it can browse web in inner app. It use itself X5 blink which seem based on webkit.

Some android phones user report some upload problems in wechat's inner browser(I use Plupload to do upload job):

  1. Click the file button but no response.(major)
  2. No response after file choose.
  3. Can't use system album, only can use picture.

But I also can't appear these issue. After adding image/jpg mime-type , the report seem become less, but still have. At the last, my boss transfer the upload file job to APP, so I am sorry to not know more.

Last but not least, my boss guess that some ardroid phone are too old to tune up andriod webview. I am in China, but our user are major in foreign country. Network related?

jayarjo commented 7 years ago

image/jpg is kind of invalid mime-type, that's why I was wondering. Can you specify an exact platform that has these problems all the time? So that we could reproduce the problem reliably.

@suhaotian what was the Android platform in your case?

suhaotian commented 7 years ago

@jayarjo It's wechat's webview bug, not android ~

jayarjo commented 7 years ago

@suhaotian so wechat's webview bug for some reason requires invalid jpeg mime type (image/jpg)?

Also do you know if this happens with other file types, or only - jpegs?

suhaotian commented 7 years ago

Yes, wechat's webview bug for some reason requires invalid jpeg mime type (image/jpg).

I can't answer second question, Maybe tonight go home test it with .png picture.

Dragon-Rider commented 6 years ago

@suhaotian Thanks for sharing :) I met a problem on android wechat. The wechat webview pop up a toast of "No apps can perform this action." I left this hint for the rest people who have the same problems : P