Take Photo > Upload to Google Drive > Get file ID
INTRO
INTRO
Quick and simple:
Take a photo using the camera component
Upload the photo to Google Drive, using the KIO4-Base64 extension to convert image to base64
Return the file ID of the image back to the app
GOOGLE APPS SCRIPT (WEB APP)
GOOGLE APPS SCRIPT (WEB APP)
function doPost(e) {
var data = Utilities.base64Decode(e.parameters.data);
var blob = Utilities.newBlob(data, e.parameters.mimetype, e.parameters.filename);
var fileID = DriveApp.getFolderById(e.parameters.folderId).createFile(blob).getId();
return ContentService.createTextOutput(fileID);
}
BLOCKS
BLOCKS
You may want to rotate and / or resize the image before uploading....
You may want to rotate and / or resize the image before uploading....
You can use this image convertor extension for that