Skip to content

Instantly share code, notes, and snippets.

@Elbone
Created February 21, 2014 01:05
Show Gist options
  • Save Elbone/9126833 to your computer and use it in GitHub Desktop.
Save Elbone/9126833 to your computer and use it in GitHub Desktop.
File types as object grouped by type
var filematches = {
// Word
"doc" : "word",
"docx" : "word",
// PDF
"pdf" : "pdf",
// Excell
"xls" : "spreadsheet",
"xlr" : "spreadsheet",
"xlsx" : "spreadsheet",
"xlst" : "spreadsheet",
"csv" : "spreadsheet",
// Text
"txt" : "text",
"rtf" : "text",
"log" : "text",
"msg" : "text",
"odt" : "text",
"pages" : "text",
"tex" : "text",
"wpd" : "text",
"wps" : "text",
// Vector
"ai" : "vector",
"eps" : "vector",
"ps" : "vector",
"svg" : "vector",
// Powerpoint
"pps" : "powerpoint",
"ppt" : "powerpoint",
"pptx" : "powerpoint",
// Media
"aif" : "media",
"iff" : "media",
"m3u" : "media",
"m4a" : "media",
"mid" : "media",
"mp3" : "media",
"mpa" : "media",
"ra" : "media",
"wav" : "media",
"wma" : "media",
"3g2" : "media",
"3gp" : "media",
"asf" : "media",
"asx" : "media",
"avi" : "media",
"flv" : "media",
"m4v" : "media",
"mov" : "media",
"mp4" : "media",
"mpg" : "media",
"rm" : "media",
"srt" : "media",
"swf" : "media",
"vob" : "media",
"wmv" : "media",
// Images
"bmp" : "image",
"dds" : "image",
"gif" : "image",
"jpg" : "image",
"jpeg" : "image",
"png" : "image",
"psd" : "image",
"pspimage" : "image",
"tga" : "image",
"thm" : "image",
"tif" : "image",
"tiff" : "image",
"yuv" : "image",
"pct" : "image",
// Default
"" : "default"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment