I'm trying to upload a PDF file to Box from NetSuite - I've constructed the multipart request body (see sample below), and the upload completes, but I cannot preview the file in Box and the file is corrupt when I download it and try to open it locally.
The contents of the file are encoded as a base64 string - I am passing the "content-transfer-encoding: base64" header, but this doesn't seem to be being understood by Box.
I've also tried to send the contents of the file unencoded, which allows a preview of the file, but the pages are blank. I'm thinking this is an encoding issue - what should be the correct encoding? I'm using UTF-8 at present - should this be ASCII?
Any assistance would be appreciated - thanks in advance.
content-disposition: form-data; name="attributes"
content-disposition: form-data; name="file"; filename="testpdffile.pdf"
JVBERi0xLjUKJeLjz9MKMjYgMCBvYmoKPDwvRmlsdGVyL0ZsYXRlRGVjb2RlL0xlbmd0aCAzNzMzPj5zdHJlYW0KeJzNWltv3DYWfp9fwbcmQKJKpK5b9CFJ0wV2t0m78e4...<data truncated for size>