Skip to content

Instantly share code, notes, and snippets.

@alexd1971
Created November 27, 2017 06:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexd1971/1fd32d4647ad5eb0f1fb2868c54d96c3 to your computer and use it in GitHub Desktop.
Save alexd1971/1fd32d4647ad5eb0f1fb2868c54d96c3 to your computer and use it in GitHub Desktop.
MimeTypes
class MimeTypes {
static const String jpeg = 'image/jpeg',
static const String png = 'image/png',
static const String gif = 'image/gif',
static const String txt = 'text/plain',
static const String doc = 'application/msword',
static const String docx = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
static const String xls = 'application/vnd.ms-excel',
static const String xlsx = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
static const String ppt = 'application/vnd.ms-powerpoint',
static const String pptx = 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
static const String pdf = 'application/pdf',
static const String zip = 'application/zip',
static const List<String > allImages = const [jpeg, png, gif],
static const List<String> msOfficeDocuments = const [doc, docx, xls, xlsx, ppt, pptx],
static const List<String> allDocuments = const [doc, docx, xls, xlsx, ppt, pptx, pdf]
}
@igvnv
Copy link

igvnv commented Nov 27, 2017

class MimeTypes {
  static const String jpeg = 'image/jpeg';
  static const String png = 'image/png';
  static const String gif = 'image/gif';
  static const String txt = 'text/plain';
  static const String doc = 'application/msword';
  static const String docx = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
  static const String xls = 'application/vnd.ms-excel';
  static const String xlsx = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
  static const String ppt = 'application/vnd.ms-powerpoint';
  static const String pptx = 'application/vnd.openxmlformats-officedocument.presentationml.presentation';
  static const String pdf = 'application/pdf';
  static const String zip = 'application/zip';
  static const List<String > allImages = const [jpeg, png, gif];
  static const List<String> msOfficeDocuments = const [doc, docx, xls, xlsx, ppt, pptx];
  static const List<String> allDocuments = const [doc, docx, xls, xlsx, ppt, pptx, pdf];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment