In the log.debug, I expected to see custevent_atta...
# suitescript
m
In the log.debug, I expected to see custevent_attach_survey line but it didn't show it. Is it possible to send a file from Postman to NS?
b
your log suggests you are logging the value of the data key
m
so I can't show the
Copy code
custevent_attach_survey
it doesn't matter it if can't be shown - but, what I am really trying to do is send a file from postman into NS, not sure I am going about this the right way.
b
what is your logging code
m
var restletData = restletBody.data; var case_data_stringified = JSON.stringify(restletData);         log.debug(case_data_stringified);
b
you are logging restletBody.data
there is no file related information in that array
your file information is in restletBody['custevent_attach_survey']
m
i was able to log that using the above.
I might be way off here, but adding a file in the 'form-data' and having the json in 'raw' - would that be enough to send the file to NetSuite?
b
depending on if you can override the content-type in the request, that could be an easy way to post the data from postman
but you would need to parse the form data from your restlet
restlet only support json or plain text for request bodies