Reputation: 623
i have this problem and can't figure out:
i have a simple input
<input type="file" id="mfile" name="file" class="input display-none optional_check" accept="image/jpg"/>
It works perfectly on desktop browsers but when i click it from a mobile device it opens a choiche between:
I would like to redirect the browse to the image folder of the mobile device like Facebook does.
Is it possible? Thank you!
EDIT 1:
putting accept="image/*" changed from (image/png,image/jpg,image/jpeg,image/gif) changed a little bit the situation avoiding choosing audio and video.
Now on Android 5.02 this is what i see:
while on Android 4.42 i see this:
What i want is getting the same choiches as android 4.4.2 in every device (IOS too).
Or if is possible doing like facebook wich goes straight to the images global folder.
It Seems to be a Android 5 Bug,anyone can help me?
Thanks!
Upvotes: 1
Views: 1660
Reputation: 407
Your "accept" value is wrong. Try to use "image/*":
<input type="file" id="mfile" name="file" class="input display-none optional_check" accept="image/*"/>
Now it should work.
Upvotes: 1