Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
How to upload text file as base64?
We want to use a restlet to upload files, some images but mostly js and css files. Our thought was to use base64 for all types to keep it simple and so we don't have to escape quote characters in the text files.
Unfortunately, if the filetype is any text type, it stores the base64 as a string without decoding it. The restlet is currently in SuiteScript 1.0 using nlapiCreateFile, but reading the help for SuiteScript 2.x, the File module and File.file object seem to be set up the same way just different syntax.
Is there a way to get the base64 decoded and set the file type to javascript or stylesheet?