WAI
Status Update
Comments
jp...@google.com <jp...@google.com>
jp...@google.com <jp...@google.com> #2
Generated Metadata
- Summary: The Apps Script application is not working as expected. The first page works, but the second page does not. It is difficult to determine the root cause without additional information.
- Tags:
Additional resources:
https://developers.google.com/apps-script/guides/support/troubleshooting https://developers.google.com/apps-script/support https://stackoverflow.com/.../how-to-debug-or-view-logs-in-google-app-scr... https://stackoverflow.com/.../appscript-webapp-hyperlink-not-working-the-... https://stackoverflow.com/.../serve-separate-html-pages-google-apps-script-...
You can
[Deleted User] <[Deleted User]> #3
Automated by Blunderbuss job workspace-devrel-public-issue-tracker-blunderbuss-autoassigner for config assign for component 191640.
Description
In Apps Script if you get a reference to a File object and call getBlob() normally you get a blob. If you call getBlob on a file that is a google drive shortcut you get an error instead.
Create a script with the functions below (sorry, untested but this is the gist) and give the doSubFolders a folder object where the folder contains a file that is a shortcut (preferably with a name different from the target)...
function doSubFolders(folder) {
doFiles(folder, folder.getFiles());
}
function doFiles(currentFolder, files) {
while(files.hasNext()) {
var file = files.next();
getCurrentName(file);
}
}
function getCurrentName(file) {
Logger.log(file.getName());
var blob = file.getBlob();
return blob;
}
...this generates an error when it encounters the shortcut...
Exception: Unexpected error while getting the method or property getBlob on object DriveApp.File.
I would expect to get a blob.