php - Qiniu JavaScript SDK restricts the type of uploaded files. Only PNG format images can be uploaded in the WeChat browser.
过去多啦不再A梦
过去多啦不再A梦 2017-05-16 13:12:05
0
2
577

I set a restriction on the file type when uploading images using Qiniu JavaScript SDK
filters:{
mime_types:[

 {title : "Image files", extensions : "jpeg,gif,png,jpg,bmp"}

],
prevent_duplicates: false,
//max_file_size: imgMaxSize, //Maximum file size limit
max_file_size:imgMaxSize
},
WeChat browsing on mobile web PC side IOS All browsers can upload pictures in these formats
But now when opening the WeChat browser on Android, only PNG format pictures can be uploaded. Other pictures have been selected and there is no response
And JS SDK The init did not go in at all
But after canceling the mime_types parameter setting, all files can be uploaded
And this phenomenon only appeared at the end of 2016!

过去多啦不再A梦
过去多啦不再A梦

reply all(2)
PHPzhong

Never use any front-end SDK

Input type="file" and html5 formdata+xmlhttprequest will do the trick. Simple and highly controllable

Peter_Zhu

I used Alibaba’s image uploading service and encountered the same situation as you. There was no response after selecting a jpg image. I thought it was because the Android version did not support jpg image uploading

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template