Reputation: 97
Is it possible to specifically request users to upload an image using HTML5?
I know it is possible to upload a file using HTML5
<input type="file" />
and that you can check you can check the filetype using js or php
but can you make it so that you can only allow users to choose an image file like you do on an native program?
Thanks
Upvotes: 2
Views: 135
Reputation: 6433
Note that this isn't supported by ie and safari.
Here is a possible solution as a jQuery plugin: http://www.fyneworks.com/jquery/multiple-file-upload/#tab-Overview
Upvotes: 0
Reputation: 421
Yes you can do it using:
<input type="file" name="picture" accept="image/*" />
The accept part can be changed like: http://www.w3schools.com/html5/att_input_accept.asp
Upvotes: 3