Created
January 17, 2023 17:09
-
-
Save dwsmart/1e947a0a57ff05d2668682040650eb51 to your computer and use it in GitHub Desktop.
get file size from url
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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