Your workflow is unique 👨‍💻 -  tell us how you use Dropbox here.

Forum Discussion

elsigh's avatar
elsigh
Helpful | Level 5
7 years ago

dropboxapi.com/2/files/upload response object missing the item `.tag` key/value

I'm saving a text file in "overwrite" mode, but the response object I get back for the item is missing it's `.tag` property (here, it should be file).

 

Example (bits copied from chrome dev console)

 

Request URL:
Dropbox-API-Arg:
`{"autorename":false,"mode":{".tag":"overwrite"},"mute":true,"path":"/songbook/Aeroplane over the Sea.pro"}`
 
Response:
```
{"name": "Aeroplane over the Sea.pro", "path_lower": "/songbook/aeroplane over the sea.pro", "path_display": "/SongBook/Aeroplane over the Sea.pro", "parent_shared_folder_id": "1397796772", "id": "id:HvHBCmOrUnAAAAAAAAAAbw", "client_modified": "2018-07-10T06:10:29Z", "server_modified": "2018-07-10T06:10:30Z", "rev": "1f15350afa4", "size": 1670, "sharing_info": {"read_only": false, "parent_shared_folder_id": "1397796772", "modified_by": "dbid:AAC7xJh2VcDvncsSSMKnV9xJNEFqtltu0i4"}, "content_hash": "5c4350e6e6ed022b9f1a8f08ba159d10632939f0255735224fccafe899288773"}
```
 
Prior response when doing a list_folder returned that file object like this:
```
{".tag":"file","name":"Aeroplane over the Sea.pro","path_lower":"/songbook/aeroplane over the sea.pro","path_display":"/SongBook/Aeroplane over the Sea.pro","parent_shared_folder_id":"1397796772","id":"id:HvHBCmOrUnAAAAAAAAAAbw","client_modified":"2018-07-10T06:10:29Z","server_modified":"2018-07-10T06:10:30Z","rev":"1f15350afa4","size":1670,"sharing_info":{"read_only":false,"parent_shared_folder_id":"1397796772","modified_by":"dbid:AAC7xJh2VcDvncsSSMKnV9xJNEFqtltu0i4"},"content_hash":"5c4350e6e6ed022b9f1a8f08ba159d10632939f0255735224fccafe899288773"}```
(notice the above has a `.tag` property)
 
I'm writing a web application and blindly trying to use the dropbox response objects as the source of truth. 
The problem is that if I lose `.tag` in the API responses, when I try to save a second time I get a `409` error for `/upload` - when `.tag` is set to file it works.
 
 

1 Reply

About Dropbox API Support and Feedback

Node avatar for Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.

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!