[媒体]js上传视频图片格式对应的原生type判断

视频格式:

  • wmv: video/x-ms-wmv
  • rm: application/vnd.rn-realmedia
  • mov: video/quicktime
  • mpeg: video/mpeg
  • mp4: video/mp4
  • 3gp: video/3gpp
  • flv: video/x-flv
  • avi: video/x-msvideo
  • rmvb: application/vnd.rn-realmedia-vbr
  • ts: video/mp2t
  • asf: video/x-ms-asf
  • mpg: video/mpeg
  • webm: video/webm
  • mkv: video/x-matroska
  • m3u8: application/x-mpegURL
  • wm: video/x-ms-wm
  • asx: video/x-ms-asf
  • ram: audio/x-pn-realaudio
  • mpe: video/mpeg
  • vob: video/dvd
  • dat: video/dvd
  • mp4v: video/mp4v-es
  • m4v: video/x-m4v
  • f4v: video/x-f4v
  • mxf: application/mxf
  • qt: video/quicktime
  • ogg: video/ogg, application/ogg

图片格式:

  1. JPG和JPEG(Joint Photographic Experts Group):.jpg 或 .jpeg
    对应的JavaScript类型:image/jpeg
  2. PNG(Portable Network Graphics):.png
    对应的JavaScript类型:image/png
  3. GIF(Graphics Interchange Format):.gif
    对应的JavaScript类型:image/gif
  4. SVG(Scalable Vector Graphics):.svg
    对应的JavaScript类型:image/svg+xml
  5. TIFF(Tagged Image File Format):.tif 或 .tiff
    对应的JavaScript类型:image/tiff
  6. BMP(Bitmap Image File):.bmp
    对应的JavaScript类型:image/bmp
  7. PSD(Adobe Photoshop Document):.psd
    对应的JavaScript类型:image/vnd.adobe.photoshop
  8. ICO(Icon):.ico
    对应的JavaScript类型:image/x-icon
  9. CR2(Canon Raw):.cr2
    对应的JavaScript类型:image/x-canon-cr2
  10. DNG(Digital Negative):.dng
    对应的JavaScript类型:image/x-adobe-dng

你可能感兴趣的:(javascript,开发语言,ecmascript)