HTML Input Accept Type

Source: Internet
Author: User

When uploading a file, you need to restrict the specified file type.

<input type= "File" accept= "image/*"/>

Accept indicates that the file type can be uploaded, image represents a picture, * represents all supported formats.

Accept can specify the following information:

*.3gpp

AUDIO/3GPP, VIDEO/3GPP

3GPP Audio/video

*.ac3

Audio/ac3

AC3 Audio

*.asf

allpication/vnd.ms-asf

Advanced Streaming Format

*.au

Audio/basic

AU Audio

*.css

Text/css

Cascading Style Sheets

*.csv

Text/csv

Comma separated Values

*.doc

Application/msword

MS Word Document

*.dot

Application/msword

MS Word Template

*.dtd

Application/xml-dtd

Document Type Definition

*.dwg

Image/vnd.dwg

AutoCAD Drawing Database

*.dxf

image/vnd.dxf

AutoCAD Drawing Interchange Format

*.gif

Image/gif

Graphic Interchange Format

*.htm

Text/html

Hypertext Markup Language

*.html

Text/html

Hypertext Markup Language

*.jp2

Image/jp2

JPEG-2000

*.jpe

Image/jpeg

Jpeg

*.jpeg

Image/jpeg

Jpeg

*.jpg

Image/jpeg

Jpeg

*.js

Text/javascript, Application/javascript

Javascript

*.json

Application/json

JavaScript Object Notation

*.mp2

Audio/mpeg, Video/mpeg

MPEG audio/video Stream, Layer II

*.mp3

Audio/mpeg

MPEG Audio Stream, Layer III

*.mp4

Audio/mp4, Video/mp4

MPEG-4 Audio/video

*.mpeg

Video/mpeg

MPEG Video Stream, Layer II

*.mpg

Video/mpeg

MPEG Video Stream, Layer II

*.mpp

Application/vnd.ms-project

MS Project Project

*.ogg

Application/ogg, Audio/ogg

Ogg Vorbis

*.pdf

Application/pdf

Portable Document Format

*.png

Image/png

Portable Network Graphics

*.pot

Application/vnd.ms-powerpoint

MS PowerPoint Template

*.pps

Application/vnd.ms-powerpoint

MS PowerPoint Slideshow

*.ppt

Application/vnd.ms-powerpoint

MS PowerPoint Presentation

*.rtf

Application/rtf, Text/rtf

Rich Text Format

*.svf

Image/vnd.svf

Simple Vector Format

*.tif

Image/tiff

Tagged Image Format File

*.tiff

Image/tiff

Tagged Image Format File

*.txt

Text/plain

Plain Text

*.wdb

Application/vnd.ms-works

MS Works Database

*.wps

Application/vnd.ms-works

Works Text Document

*.xhtml

Application/xhtml+xml

Extensible Hypertext Markup Language

*.xlc

Application/vnd.ms-excel

MS Excel Chart

*.xlm

Application/vnd.ms-excel

MS Excel Macro

*.xls

Application/vnd.ms-excel

MS Excel Spreadsheet

*.xlt

Application/vnd.ms-excel

MS Excel Template

*.xlw

Application/vnd.ms-excel

MS Excel Workspace

*.xml

Text/xml, Application/xml

Extensible Markup Language

*.zip

Aplication/zip

Compressed Archive

HTML Input Accept Type

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.