Take Your Search Game to the Next Level with Dropbox Dash 🚀✨ Curious how it works? Ask us here!
Forum Discussion
knoppys
3 years agoExplorer | Level 3
Dropbox Upload API - Sending special characters in file path
Hi All
Im trying to send a file to DB using the upload API using the JS SDK. The upload IS WORKING, however, when the file is folder "Salt and Pepper" is created, its replacing the & symbol that Im sending with &.
The file path I am trying to write to is:
/Salt & Pepper/serialnumber-filename.zip
However, the file path being written is:
/Salt & Pepper/serialnumber-filename.zip
Here is my code?
var path = '/Salt & Pepper/'+file.name;
dbx.filesUpload({path: path, contents: file})
Should this be painfully obvious to me? lol
EDIT: I answered my own question looking into it. Im actually saving the folderpath on my side using the & and not the & symbol after all. This is totally why its not working.
Thanks for your help anyway.
3 Replies
Sort By
- ЗдравкоLegendary | Level 20
- knoppysExplorer | Level 3
Hi
Thanks for your comment.
- Greg-DB
Dropbox Staff
knoppys As Здравко mentioned, you're missing a leading slash in the path you're showing here, so this call would fail anyway, and would not upload anything.
If you are successfully uploading something, e.g., with a different version of this code, though, can you clarify where/how you're seeing the unexpected "&"?
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,989 PostsLatest Activity: 40 minutes ago
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 or Facebook.
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!