Some troubles with kyo4_base641

hi everyone!

hope you're doing great!

i have some troubles uploading pictures to my drive, going to attach the aia file and the script too, i cant understand why inst working

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);

}

Centro_Poliss_Lato_utente.aia (1.9 MB)

On first look, you set the file extension for a jpg image file to _img.txt, could be that the script cannot handle an image file that is a jpg with a mimetype of text/plain/text/html ?

Try with fileExt = _img.jpg