Pardon me, I'm not well-versed with curl, but I am trying to download a Google Drive image using it. The file downloads as an HTML, rather than as a jpg. I am calling the curl via Applescript shell script wrapped in an Extendscript app.doScript command, but I tried also from the Terminal and received the same file. I followed these instructions: https://stackoverflow.com/a/48133140/1810714
Here is the full Extendscript code I am working with.
var assetFolderPath = Folder.selectDialog();
var fileName = "/test.jpg";
var front = "https://drive.google.com/uc?export=download&id=";
var root = "google-drive-id#"; //the real id is here instead
var exporturl = front + root;
var ff = File(assetFolderPath + fileName);
var curlCommand = "\"curl -L -o '" + ff.fsName + "' " + "'" + exporturl + "'";
var asCode = 'do shell script ' + curlCommand + '"';
app.doScript(asCode, ScriptLanguage.APPLESCRIPT_LANGUAGE);
Thanks in advance.