Join Slack
Powered by
<@U5FHY30BV> you have to use multipart/form-data f...
# suitescript
e
Eric B
06/17/2019, 9:27 PM
@darrenhillconsulting
you have to use multipart/form-data for content-type
d
darrenhillconsulting
06/18/2019, 2:21 AM
Still struggling, do you have a code snippet for using multipart/form-data?
e
Eric B
07/02/2019, 2:44 PM
first declare this -- var contentType = 'multipart/form-data;boundary=XXFeedBoundary';
Eric B
07/02/2019, 2:44 PM
and then -- fileContent = '--XXFeedBoundary\n\n' + fileContent + '--XXFeedBoundary--';
Eric B
07/02/2019, 2:45 PM
where fileContent is defined as var fileContent = file.load(fileId).getContents();
Eric B
07/02/2019, 2:46 PM
and then use fileContent as the body of what you're sending via
https.post
22
Views
Open in Slack
Previous
Next