Google Drive mime-types listing? [closed]

$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

How to automatically import data from uploaded CSV or XLS file into Google Sheets

You can programmatically import data from a csv file in your Drive into an existing Google Sheet using Google Apps Script, replacing/appending data as needed. Below is some sample code. It assumes that: a) you have a designated folder in your Drive where the CSV file is saved/uploaded to; b) the CSV file is named … Read more

Download a spreadsheet from Google Drive / Workspace using Python

The https://github.com/burnash/gspread library is a newer, simpler way to interact with Google Spreadsheets, rather than the old answers to this that suggest the gdata library which is not only too low-level, but is also overly-complicated. You will also need to create and download (in JSON format) a Service Account key: https://console.developers.google.com/apis/credentials/serviceaccountkey Here’s an example of … Read more

Add Image to GitHub Readme.md from Google Drive

For example, I have a.jpg on the google drive. Right click the image and click Share… Click Advanced and change the Who can access option to Public on the web – Anyone on the Internet Copy the link to share and you will have something like https://drive.google.com/file/d/<FILE_ID>/view?usp=sharing Copy the <FILE_ID> to make a link like … Read more

Error: invalid_request device_id and device_name are required for private IP

An alternative to editing a hosts file is to use the “Magic DNS” service https://nip.io/ nip.io is a magic domain name that provides wildcard DNS for any IP address. Say your LAN IP address is 10.0.0.1: 10.0.0.1.nip.io resolves to 10.0.0.1 (dot syntax) 192-168-1-250.nip.io resolves to 192.168.1.250 (dash syntax) 0a000803.nip.io resolves to 10.0.8.3 (hex syntax) foo.bar.10.0.0.1.nip.io … Read more

Creating anchored comments programmatically in Google Docs

The Anchoring Comments feature from the Google Drive API is intended for non-Google Docs editors files, not for Google Documents. See https://youtu.be/ZBU52nacbLw?t=5m26s (credit to Bryan P who shared this URL through a comment) Unfortunatelly at this time the Document Service from Google Apps Script doesn’t include a Class Comment to handle comments and discussions. At … Read more