cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Discuss Dropbox Developer & API

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

response as undefinedundefined

response as undefinedundefined

bspindia
Helpful | Level 7

i am getting this response, and image is not uploading to give path

{
"name": "undefinedundefined",
"path_lower": "/undefinedundefined",
"path_display": "/undefinedundefined",
"id": "id:Dklv8Y9b8_sAAAAAAAAALA",
"client_modified": "2022-12-11T19:09:18Z",
"server_modified": "2022-12-11T19:09:18Z",
"rev": "015ef921f9e8a30000000028cbc87e0",
"size": 222652,
"is_downloadable": true,
"content_hash": "10155378dc9b80f6c6a24fba6d4d4e5821fda492053d3f318817f03f09f92662"
}

2 Replies 2

Здравко
Legendary | Level 20

Hi @bspindia,

😁 Your file comes uploaded correct, seems. If this file is image, as you're stating, missing proper file extension in the file name can disturb the file handling/previewing on Dropbox site (in spite it's still valid). 🤷 Unfortunately, Dropbox isn't so smart. That's why don't forget set proper file extension whenever possible! 😉 Otherwise don't rely on proper Dropbox processing (including preview) more than just storage.

Greg-DB
Dropbox Staff

@bspindia As Здравко mentioned, you need to set the file extension (and name) when uploading to Dropbox via the API.

 

For example, when uploading using the /2/files/upload endpoint, you should set the full path, including file name and extension, of where you want to upload the file in the "path" parameter.

 

In the output you shared, the resulting path is "/undefinedundefined", so it appears you have not properly set the path, name, and extension for the file when uploading it. (It looks like you attempted to set the path to two undefined values that you joined.) You'll need to fix your code to set that properly.

Need more support?
Who's talking

Top contributors to this post

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