In NetSuite with SuiteScript 2.0 unable to send a file with HTTP POST request with a content-type multipart/form-data
I am not able to send my "multipart/form-data' file to this API. If I use POSTMAN it's working but with the https post method it seems that netsuite doesn't recognize the "form-data" content-type. Somebody knows how to send a form-data with SuiteScript 2 ? Here is a part of my code: var fileObj = file.create({ name: invoiceNumber + '_ubl.xml', fileType: file.Type.XMLDOC, contents: einvoicecontentwithpdf, folder : 120, isOnline : false }); var headers = { 'Authorization': 'Basic xxxxxxxxxxxxxxxxxxxxx', 'Content-Type': 'multipart/form-data' }; var response = https.post({ url: 'https://community