cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you interested in hearing how one of our Community members uses Dropbox for sailing trips? Read all about it here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dropbox Upload API - Sending special characters in file path

Dropbox Upload API - Sending special characters in file path

knoppys
Explorer | Level 3

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 3

Здравко
Legendary | Level 20

Hi @knoppys,

What about leading slash? 🧐😉

Hope this helps.

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 "&"?

knoppys
Explorer | Level 3

Hi

Thanks for your comment.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    knoppys Explorer | Level 3
  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Здравко Legendary | Level 20
What do Dropbox user levels mean?