HTML5 input:file Upload Type control

Source: Internet
Author: User

First, Input:file properties

The following are some of the more commonly used property values:

Accept: Represents the file MIME type that can be selected, multiple MIME types are separated by commas, and the commonly used MIME types are shown in the following table.

Multiple: Whether multiple files can be selected, the value of which is the virtual path of the first file when multiple files.

1. Accept

Only PNG and GIF images can be selected

<input id= "fileId1" type= "file" accept= "image/png,image/gif" name= "file"/>
2, multiple

Multiple file uploads

<input id= "fileId2" type= "file" multiple= "multiple" name= "file"/>
3. Common MIME Types
Suffix name Mime name *.3gpp audio/3gpp, video/3gpp*.ac3 audio/ac3*.asf allpication/vnd.ms-asf*.au audio/b    Asic*.css text/css*.csv text/csv*.doc application/msword *.dot Application/msword *.dtd     Application/xml-dtd *.dwg image/vnd.dwg *.dxf image/vnd.dxf*.gif image/gif *.htm text/html *.html text/html *.jp2 image/jp2 *.jpe image/jpeg*.jpeg image/jpeg*.jpg image/jp    Eg *.js Text/javascript, application/javascript *.json application/json *.mp2 audio/mpeg, Video/mpeg *.mp3 audio/mpeg *.mp4 audio/mp4, video/mp4 *.mpeg video/mpeg *.mpg video/mpeg *.mpp Applica Tion/vnd.ms-project *.ogg Application/ogg, Audio/ogg *.pdf application/pdf *.png image/png *.pot A            Pplication/vnd.ms-powerpoint *.pps application/vnd.ms-powerpoint *.ppt application/vnd.ms-powerpoint *.rtf Application/rTF, text/rtf *.svf image/vnd.svf *.tif image/tiff *.tiff image/tiff *.txt te    Xt/plain *.wdb application/vnd.ms-works *.wps application/vnd.ms-works *.xhtml application/xhtml+xml *.XLC application/vnd.ms-excel *.xlm application/vnd.ms-excel *.xls application/vnd.ms-excel *.            XLT application/vnd.ms-excel *.xlw application/vnd.ms-excel *.xml text/xml, Application/xml *.zip Aplication/zip *.xlsx Application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

  

HTML5 input:file Upload Type control

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.