One of the crucial requirements in the application I am writing is that user being able to upload (input type="file") a photo from within a form.
Does the android web browser support File Uploads? If yes do all versions 1.5+ support it?
You can use this:
<input type="file" name="photo" accept="image/*" capture="camera">
The important thing is
capture="camera"
EDIT: as per lastest spec capture is a boolean attribute
Yes and no. Some people seem to have problems doing so (as outlined in the comments). Although it worked for all my devices, it's entirely possible that a different browser might not at all implement this feature.
The user can however not upload any file on the SD Card, but Audio-, Video- and Image-Files that are on the internal/external storage. The kind of files you can upload depend on the installed applications. If you have a File-Manager installed (or shipped with the OS), you can also use it to upload any file you want (Gallery and Mediaplayer should always be present).
When the upload-button of a <input type="file">
is pressed, browsers seem to send the Intent.ACTION_GET_CONTENT
-Intent, so every application listening to this is a possible file-source.
The correct format for Device API HTML input is:
<input type="file" name="photo" accept="image/*;capture=camera"></input>
This is supported by devices with Android 3.0 (for tablets) or Android 4.0 and later (for phones). I have no idea which version of iOS starts to support this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With