Felicia
05/12/2021, 2:18 AMvar data = new FormData();
$.each( $( '.file' )[ 0 ].files, function( i, file ) {
console.log( file );
data.append( 'file-' + i, file );
} );
console.log( data );
$.ajax( {
url: postURL,
data: data,
cache: false,
contentType: false,
processData: false,
method: 'POST',
type: 'POST', // For jQuery < 1.9
success: function( data ) {
alert( data );
}
however, the body of the request in the suitelet is empty.
any help is greatly appreciated!!battk
05/12/2021, 2:20 AMFelicia
05/12/2021, 2:37 AM{
"file-0": {
"type": "file.File",
"id": null,
"name": "Custom_1000064.pdf",
"description": null,
"path": "Custom_1000064.pdf",
"url": null,
"folder": -1,
"fileType": "PDF",
"isText": false,
"size": 59752,
"encoding": null,
"isInactive": false,
"isOnline": false
}
}
Thank you so so much for your help!battk
05/12/2021, 2:41 AMFelicia
05/12/2021, 2:51 AM