File chooser
The <input> element with type="file" allows the user to choose one or more files from their device storage. Usually this used for uploading files to server.
code | result |
---|---|
|
|
attributes
attribute | description |
---|---|
id, name | Name of element. |
accept |
Defines the types of files that the user can select. Value is a string, that represents a comma-separated list of file extensions (with dot) or valid mime-types. For example "image/*, .pdf". |
multiple |
A boolean value indicating that the user can select more than one file. |
files |
Contains a list of selected files. |
capture |
Specifies which camera to use for capture of image or video data. Possible values:
|