--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-script-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/6d8d22e1-a629-4884-87b0-08b9b8b7e0c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Good idea. I think I'll implement that. I did add a folder picker and the code will add a file directly to a folder with advanced drive service. So, another hurdle overcome.
function createFolder(folderName, parentFolderId) {
var resource = {
title: folderName,
mimeType: "application/vnd.google-apps.folder"
};
if (parentFolderId) resource.parents = [{ id: parentFolderId }];
return Drive.Files.insert(resource);}
Yes, it does allow to create a new folderTry as follow ...
function createFolder(folderName, parentFolderId) {
var resource = {
title: folderName,
mimeType: "application/vnd.google-apps.folder"
};
if (parentFolderId) resource.parents = [{ id: parentFolderId }];
return insert(resource);
}
p.s. parentFolderId defaults to 'root'
On Tuesday, June 18, 2019 at 8:15:32 AM UTC-4, aj.addons wrote:The "auth/drive.file" scope won't allow a new folder to be created, so it's back to putting the file in the root if the user doesn't pick a folder.
On Tuesday, June 18, 2019 at 7:46:14 AM UTC-4, Alan Wells wrote:Good idea. I think I'll implement that. I did add a folder picker and the code will add a file directly to a folder with advanced drive service. So, another hurdle overcome.On Tue, Jun 18, 2019 at 6:41 AM Faustino Rodriguez wrote:There is no way to get the parent folder of a file with currentonly and drive.file scopes- But you can create a folder hanging from root to hold the files the add-on create there
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-script-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/48335f0f-0960-4a63-8afd-bc5aad23faf1%40googlegroups.com.