I have to send, via https.request
, a PDF file, but I only have the Base64 content and the only format that the server accepts is the byte array.
In JavaScript, on the client side, that's very simple (UInt8Array
and Blob
) but those are not implemented in NetSuite so I can't use them. Is there any alternative way to do that without using UInt8Array
or Blob
?
I compose the body of the multipart/form-data request and in the body I decoded the Base64 to a UTF-8 string but it doesn't work, it sends the file correctly but is empty.
The format that I need is application/octet-stream.