Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
jmbrox
6 years agoExplorer | Level 3
How to encode/decode correctly using NetSuite file upload in Suitelet
I'm trying to use NetSuite's N/file module to upload a file to DropBox. I've been successful at authentication, getting a 200 when submitting the POST request to Create FolderV2 and Upload File. Howe...
Greg-DB
Dropbox Community Moderator
6 years agoIn your code, I see you're uploading the data in the 'decodedStr', which is defined via 'var decodedStr = toBase64(fileContents);'. That seems like it may be the opposite of what you want to do though. The Dropbox API does not expect the uploaded data to have a layer of base64 encoding and will not automatically undo any such layer set by the client. Further, it looks like the original contents in 'fileContents' may already be base64-encoded, so "toBase64" may be the wrong thing to do anyway. Did you perhaps mean to implement and use a "fromBase64" instead? (That would also make more sense given the variable name 'decodedStr'.)
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!