sorry to bother you again

I get this error while i'm tryng to create the object to send to an ftp server, here is my code:
Code: Select all
switch (acquireModalState) {
case 2: // image is acquired
// get acquired image
var acquiredImage = acquireModalResult.get_AcquiredImage();
// add acquired image to the collection of acquired images
acquiredImages.add(acquiredImage);
console.log(acquiredImages);
break;
case 4: // scan is failed
alert(acquireModalResult.get_ErrorMessage());
break;
case 9: // scan is finished
let params = {};
var imageIds = []
// for each acquired image
for (var i = 0; i < acquiredImages.get_Count(); i++){
// add image identifier to array of image identifiers
imageIds.push(acquiredImages.get_Item(i).get_Id());
}
// save images to an image file and return file data as a Base64 string
var imageFileAsBase64String = acquiredImages.getAsBase64String(nome_file+'.pdf', imageIds);
params.fileToUpload = imageFileAsBase64String;
Thank you in advance for your help.
Luigi