Skip to content

Instantly share code, notes, and snippets.

@dwsmart
Created January 17, 2023 17:09
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save dwsmart/1e947a0a57ff05d2668682040650eb51 to your computer and use it in GitHub Desktop.
get file size from url
# google sheets app script to get file size in bytes from a url
function getSizes(theurl) {
const response = UrlFetchApp.fetch(theurl);
const blob = response.getBlob()
const size = blob.getBytes().length
return size
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment