Skip to content

Instantly share code, notes, and snippets.

@DJStompZone
DJStompZone / 1.svg
Created November 13, 2021 20:08
svg4everyone
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@DJStompZone
DJStompZone / Download file from URL.js
Created June 8, 2021 01:46 — forked from mogsdad/Download file from URL.js
In StackOverflow question #14573055, the question was how to "download" a file from a URL using Google Apps-Script. See http://stackoverflow.com/questions/14573055/can-i-download-file-from-url-link-generated-by-google-apps-script/14574217#14574217. You can't actually "download" the source file, because apps-script has no access to your PC's file…
/**
* Retrieve a file from the given URL, store into the named folder
* on Google Drive.
*
* @param {String} fileURL URL to source file, e.g. "http://mysite.com/files/file.val1.val22.zip"
* @param {String} folder Name of target folder on Google Drive
*
* @returns {Object} Response of operation, e.g.
* {rc:200,fileName:"test.zip",fileSize:92994392}
*/