Struts2 file upload, allowtype parameter settings

Source: Internet
Author: User
Tags pkcs12 rfc822 gtar

.:

Application/octet-stream

. AI:

Application/postscript

'. Aif ':

'Audio/X-AIFF ',

'. Aifc ':

'Audio/X-AIFF ',

'. AIFF ':

'Audio/X-AIFF ',

'. Au ':'

Audio/basic ',

'. Avi ':

'Video/X-msvideo ',

'. Batt ':

'Text/plain ',

'. Bcpio ':

'Application/X-bcpio ',

'. Bin ':

'Application/octet-stream ',

'.Bmp ':

'Image/X-MS-BMP ',

'. C ':

'Text/plain ',

 

# Duplicates

 

'. Cdf ':

'Application/X-cdf ',

 

'. Cdf'

: 'Application/X-netcdf ',

'. Cpio ':

'Application/X-cpio ',

'. Csh ':

'Application/X-csh ',

'.Css ':

'Text/CSS ',

'. Dll ':

'Application/octet-stream ',

'.Doc ':

'Application/msword ',

'. Dot ':

'Application/msword ',

'. DVI ':

'Application/X-DVI ',

'. Yml ':

'Message/rfc822 ',

'. Ss ':

'Application/postscript ',

'. Etx ':

'Text/X-setext ',

'.Exe ':

'Application/octet-stream ',

'.Gif ':

'Image/gif ',

'. Gtar ':

'Application/X-gtar ',

'. H ':

'Text/plain ',

'. Hdf ':

'Application/X-hdf ',

'.Htm ':

'Text/html ',

'.Html ':

'Text/html ',

'. Ief ':

'Image/ief ',

'. Jpe ':

'Image/JPEG ',

'.Jpeg ':

'Image/JPEG ',

'.Jpg ':

'Image/JPEG ',

'. Js ':

'Application/X-JavaScript ',

'. Ksh ':

'Text/plain ',

'. Latex ':

'Application/X-latex ',

'. M1v ':

'Video/MPEG ',

'. Man ':

'Application/X-troff-man ',

'. Me ':

'Application/X-troff-me ',

'. MHT ':

'Message/rfc822 ',

'. MHTML ':

'Message/rfc822 ',

'. Pem ':

'Application/X-MIF ',

'. Mov ':

'Video/quicktime ',

'. Movi ':

'Video/X-SGI-movi ',

'. Mp2 ':

'Audio'/MPEG ',

'Authorization ':

'Audio'/MPEG ',

'. MPa ':

'Video/MPEG ',

'. Mpe ':

'Video/MPEG ',

'. MpEG ':

'Video/MPEG ',

'. Mpg ':

'Video/MPEG ',

'. Ms ':

'Application/X-troff-Ms ',

'. Nc ':

'Application/X-netcdf ',

'. Nws ':

'Message/rfc822 ',

'. O ':

'Application/octet-stream ',

'. OBJ ':

'Application/octet-stream ',

'. Oda ':

'Application/oda ',

'. P12 ':

'Applications/x-pkcs12 ',

'. P7c ':

'Applications/pkcs7-mime ',

'. Pbm ':

'Image/X-portable-bitmap ',

'Authorization ':

'Application/pdf ',

'. Pfx ':

'Applications/x-pkcs12 ',

'. PGM ':

'Image/X-portable-graymap ',

'. Pl ':

'Text/plain ',

'.Png ':

'Image/PNG ',

'. PNM ':

'Image/X-portable-anymap ',

'. Pot ':

'Application/vnd. MS-PowerPoint ',

'. Ppu ':

'Application/vnd. MS-PowerPoint ',

'. Ppm ':

'Image/X-portable-pixmap ',

'. Pas ':

'Application/vnd. MS-PowerPoint ',

'.Ppt ':

'Application/vnd. MS-PowerPoint ',

'. Ps ':

'Application/postscript ',

'. Pwz ':

'Application/vnd. MS-PowerPoint ',

'. Py ':

'Text/X-python ',

'. Pyc ':

'Application/X-Python-Code ',

'. Pyo ':

'Application/X-Python-Code ',

'. QT ':

'Video/quicktime ',

'. ':

'Audio/X-PN-realaudio ',

'. Ram ':

'Application/X-PN-RealAudio ',

'. Rs ':

'Image/X-CMU-raster ',

'. RDF ':

'Application/xml ',

'. RGB ':

'Image/X-RGB ',

'. Roff ':

'Application/X-troff ',

'. Rtx ':

'Text/richtext ',

'. SGM ':

'Text/X-sgml ',

'. Sgml ':

'Text/X-sgml ',

'. Sh ':

'Application/X-Sh ',

'. Shar ':

'Application/X-Shar ',

'. Snd ':

'Audio'/basic ',

'. So ':

'Application/octet-stream ',

'. Src ':

'Application/X-WAIS-source ',

'. Sv4cpio ':

'Applications/x-sv4cpio ',

'. Sv4crc ':

'Applications/x-sv4crc ',

'.Swf ':

'Application/X-Shockwave-flash ',

'. T ':

'Application/X-troff ',

'.Tar ':

'Application/X-tar ',

'. TCL ':

'Application/X-tcl ',

'. Tex ':

'Application/X-Tex ',

'. Texi ':

'Application/X-texinfo ',

'. Texinfo ':

'Application/X-texinfo ',

'. Tif ':

'Image/tiff ',

'. Tiff ':

'Image/tiff ',

'. Tr ':

'Application/X-troff ',

'. Tsv ':

'Text/TAB-separated-values ',

'.Txt ':

'Text/plain ',

'. Ustar ':

'Application/X-ustar ',

'. VCF ':

'Text/X-vcard ',

'.Wav ':

'Audio/X-WAV ',

'. Wiz ':

'Application/msword ',

'. WSDL ':

'Application/xml ',

'. Xbm ':

'Image/X-xbitmap ',

'. Xlb ':

'Application/vnd. MS-Excel ',

 

# Duplicates

 

'.Xls ':

'Application/Excel ',

'.Xls ':

'Application/vnd. MS-Excel ',

. Xml:

Text/XML

. Xpdl:

Application/XML

. XPM:

Image/X-xpixmap

. XSL:

Application/XML

. Xwd:

Image/X-xwindowdump

. Zip:

Application/zip

 

Differences between Firefox and IE File Types

 

Firefox:

Image/JPEG, image/BMP, image/GIF, image/PNG

IE 6:

Image/pjpeg, image/BMP, image/GIF, image/X-PNG

IE 7:

Image/pjpeg, image/BMP, image/GIF, image/X-PNG

IE 8:

Image/pjpeg, image/BMP, image/GIF, image/X-PNG

IE 9:

Image/JPEG, image/BMP, image/GIF, image/PNG

 

Therefore, in the Struts. xml configuration file

<Param name = "allowedtypes">
Image/BMP, image/PNG, image/GIF, image/JPEG, image/jpg,
Image/pjpeg, image/BMP, image/GIF, image/X-PNG,
</Param>

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.