Is it possible to upload image from camera to google datasheet?

so this method can sent multiple image too right in 1 button/click and it will upload it one by one by using the looping of the list

I got question why I successful sent the 1st camera image to google drive but not successful in 2nd image? is not appear in google drive

function doPost(e) {

var data = Utilities.base64Decode(e.parameters.file);

var blob = Utilities.newBlob(data, e.parameters.fileformat, e.parameters.filename);



DriveApp.getFolderById('10UiP79hka4W-44RCPBCzHOr7SF_COotP').createFile(blob);

var data2 = Utilities.base64Decode(e.parameters.file2);

var blob2 = Utilities.newBlob(data2, e.parameters.fileformat2,e.parameters.filename2);

DriveApp.getFolderById('10UiP79hka4W-44RCPBCzHOr7SF_COotP').createFile(blob2);

return ContentService.createTextOutput("Your File Successfully Uploaded");

}

here is the google script. Please help me see if I do any mistake

can I know how about the google script coding?

The first step is to get a solution running, which is able to upload one image

The second step is to study the previously mentioned example and adjust it to your needs... i.e. 1) call the script to upload an image, 2) after uploading, check if there are more images to upload... if yes, continue with 1) else stop uploading

Taifun

got example to call the script to upload an image? as what you said?

Which means, you have problems with the first step? You might want to restart from here

Taifun

I manage to upload only 1 image but cannot upload 2nd image to google drive.

I now looked at your blocks from post #40
why are you using 2 camera components? just use one and make sure to use different image filenames for the upload...

the logic is:

  1. take picrture
  2. after picture is taken upload image to Google Drive
  3. after upload is done continue with 1)

Taifun