We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
bspindia
3 years agoHelpful | Level 7
response as undefinedundefined
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
- Здравко3 years agoLegendary | 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-DB3 years ago
Dropbox Community Moderator
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.
About Discuss Dropbox Developer & API
Make connections with other developers815 PostsLatest Activity: 6 years ago
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 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!