Can i upload files from external system to NetSuit...
# suitescript
g
Can i upload files from external system to NetSuite file cabinet using nlapirequesturl()? Is ther anything else i should consider? for example: if the file is not public
b
beware binary files, nlapiCreateFile requires binary content to be saved in base64
you will only get base64 content from nlapiRequestURL if the external server returns a content type that netsuite recognizes as binary
unrecognized content types are encoded as utf-8, which will destroy binary content
g
@battk thanks. Do i have to consider any connection issues?
b
nothing beyond the normal errors thrown by nlapiRequestURL.
you should go through the documentation of both those functions to see the limitations associated with them
g
okay thank you
@battk what if the external system sends file itself?
b
Same limitations for nlapiCreateFile
Your external server will have to base 64 the file contents
And either add the files via soap or restlet
g
okay thank you