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?
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.
$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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With