The upload button does not work on some mobile devices

imlike

New Member
The upload button does not work on some mobile devices. For example,QQ,Wechat,Quark browser,QQbrower mobile,etc.
When you click the upload button, they will tell you that you cannot open the file selector.
 

Rodolfo

Chevereto creator
Chevereto Staff
I was able to test Wechat "web browser" (I use quotes because it is a webview, not a web browser) and I noticed that it doesn't handle the file picker properly.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#Limiting_accepted_file_types
^ This contains the standard required for Limiting accepted file types (files accepted by the system).

If you scroll a bit, you will se a demo box which doesn't work in Wechat webview, meaning that their webview fails to deliver when you use a comma separated list of allowed extensions. It seems that Wechat webview only accepts image/* syntax, and it doesn't support multiple selection either, you have to pick images one by one.

I've managed to came up with an accept declaration that works with Wechat without altering other web browsers, you can check here: https://demo.chevereto.com/upload

HTML:
<input id="anywhere-upload-input" data-action="anywhere-upload-input" class="hidden-visibility" type="file" accept="image/*, .jpg, .png, .bmp, .gif, .webp, .jpeg" multiple>
By the way, and allow me to insist on this: The limitation for supporting multiple images is not a problem of Chevereto, as you can check that this has the same limitation: https://postimages.org/ also other webviews (like Discord's) don't have any issues so I'm pretty sure that the problem is not Chevereto. It is Wechat poor webview implementation when dealing with file picker filters.

I will include the workaround in the next revision.
 
  • Like
Reactions: rdn

imlike

New Member
I was able to test Wechat "web browser" (I use quotes because it is a webview, not a web browser) and I noticed that it doesn't handle the file picker properly.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#Limiting_accepted_file_types
^ This contains the standard required for Limiting accepted file types (files accepted by the system).

If you scroll a bit, you will se a demo box which doesn't work in Wechat webview, meaning that their webview fails to deliver when you use a comma separated list of allowed extensions. It seems that Wechat webview only accepts image/* syntax, and it doesn't support multiple selection either, you have to pick images one by one.

I've managed to came up with an accept declaration that works with Wechat without altering other web browsers, you can check here: https://demo.chevereto.com/upload

HTML:
<input id="anywhere-upload-input" data-action="anywhere-upload-input" class="hidden-visibility" type="file" accept="image/*, .jpg, .png, .bmp, .gif, .webp, .jpeg" multiple>
By the way, and allow me to insist on this: The limitation for supporting multiple images is not a problem of Chevereto, as you can check that this has the same limitation: https://postimages.org/ also other webviews (like Discord's) don't have any issues so I'm pretty sure that the problem is not Chevereto. It is Wechat poor webview implementation when dealing with file picker filters.

I will include the workaround in the next revision.
You're right. I was able to use the upload button in the link you provided. Chevereto is not a problem but a problem with Wechat. By the way, I've learned some HTML syntax, and maybe I can fix it myself. So, I want to know the path of the file and the method of modification.If this is an infringement, I will stop doing it and wait for your update. Thanks again!
 
Top