I want select a photo and send to google drive.why the companion send photo but phone dont send?

Got this working companion and compiled on 8.1

mah.aia (49.1 KB)

Dragged in a File component and added a conditional permission request. Changed the base64 encode blocks.

ok work.thanks. :rose: :rose: :rose:
image

2 Likes

Hi . I want to specify the folder ID in the application, not in the app script

function doPost(e){
var data = Utilities. base64Decode(e.parameters.data);
var blob = Utilities. newBlob(data, e.parameters.mimetype, e.parameters.filename);
DriveApp.getFolderById('1cN6hP-JCa7UB13kZ67eA').createFile(blob);
return ContentService.createTextOutput("your File Successfully Uploaded");
}

What changes should I make in the app script?
thanks

Change this line:

DriveApp.getFolderById('1cN6hP-JCa7UB13kZ67eA').createFile(blob);

to

DriveApp.getFolderById(e.parameters.folderId).createFile(blob);

and add:
image

to your PostText

remember to create a new version of your script

1 Like

ok. thats right. thanks :rose:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.