Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Drive mime-types listing? [closed]

As per https://developers.google.com/drive/manage-uploads, it mentions

See the API reference for each method's list of accepted mime types and size limits for uploaded files.

I was unable to find mime type listing at https://developers.google.com/drive/v2/reference/ Where can I find it?

like image 921
MikeLim Avatar asked Aug 10 '12 02:08

MikeLim


People also ask

Where are MIME types stored?

All MIME type information is stored in a database. The MIME database is located in the directory /usr/share/mime/ . The MIME database contains a large number of common MIME types, stored in the file /usr/share/mime/packages/freedesktop.


2 Answers

$mime_types= array(     "xls" =>'application/vnd.ms-excel',     "xlsx" =>'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',     "xml" =>'text/xml',     "ods"=>'application/vnd.oasis.opendocument.spreadsheet',     "csv"=>'text/plain',     "tmpl"=>'text/plain',     "pdf"=> 'application/pdf',     "php"=>'application/x-httpd-php',     "jpg"=>'image/jpeg',     "png"=>'image/png',     "gif"=>'image/gif',     "bmp"=>'image/bmp',     "txt"=>'text/plain',     "doc"=>'application/msword',     "js"=>'text/js',     "swf"=>'application/x-shockwave-flash',     "mp3"=>'audio/mpeg',     "zip"=>'application/zip',     "rar"=>'application/rar',     "tar"=>'application/tar',     "arj"=>'application/arj',     "cab"=>'application/cab',     "html"=>'text/html',     "htm"=>'text/html',     "default"=>'application/octet-stream',     "folder"=>'application/vnd.google-apps.folder' ); 

In addition, here is a list of mime-types specifically pertaining to Google drive (and the google suite): https://developers.google.com/drive/v3/web/mime-types

like image 150
sgv_test Avatar answered Oct 03 '22 00:10

sgv_test


I found a complete list of file extensions and mime types from Google itself in GitHub:

google-drive-proxy / DriveProxy / API / MimeType.cs


From Drive REST API reference:

Maximum file size: 5120GB

Accepted Media MIME types: */*

In other words, you can use any mime type that matches the pattern */*.

Here is the IANA list of official media types. You can learn more about media types here.

like image 35
IvanRF Avatar answered Oct 03 '22 01:10

IvanRF