We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
YOUNGGON K.
11 years agoNew member | Level 1
Upload API's mode and autorename parameter do not work.
As you know, Upload API has mode and autorename parameters.
I configured "mode" parameter as "add" and "autorename" parameter as true.
But Dropbox did not return FileMetadata with new name although the same file already existed.
Here is the request and response message.
POST https://content.dropboxapi.com/2/files/upload
Accept-Encoding:identity
Authorization:Bearer <REDACTED>
Connection:Keep-Alive
Content-Type:application/octet-stream
Dropbox-API-Arg:{"path":"\/1601337242.gif","mode":"add","autorename":true,"mute":true}
User-Agent:LibHttp/1.3.8
<Redacted binary file>
HTTP/1.1 200 OK
cache-control:no-cache
Connection:keep-alive
Content-Type:application/json
Date:Fri, 20 Nov 2015 07:05:29 GMT
pragma:no-cache
Server:nginx
Transfer-Encoding:chunked
X-Android-Received-Millis:1448003129783
X-Android-Response-Source:NETWORK 200
X-Android-Selected-Protocol:http/1.1
X-Android-Sent-Millis:1448003127334
X-Dropbox-Request-Id:6ee8daec93154092c45b8e9e170f4c2c
X-Robots-Tag:noindex, nofollow, noimageindex
X-Server-Response-Time:650
{"name": "1601337242.gif", "path_lower": "/1601337242.gif", "id": "id:bw23gp5jSB0AAAAAAAAAgA", "client_modified": "2015-11-20T07:05:29Z", "server_modified": "2015-11-20T07:05:29Z", "rev": "134203ce523", "size": 4707}
Best regards,
Younggon Kim
2 Replies
Replies have been turned off for this discussion
- Steve M.11 years ago
Dropbox Staff
Were the new file contents identical to the old file contents? If the content is the same, nothing gets changed and no new file is created.
See the documentation for WriteMode in /files/upload:
"In some situations, the conflict behavior is identical: (a) If the target path doesn't contain anything, the file is always written; no conflict. (b) If the target path contains a folder, it's always a conflict. (c) If the target path contains a file with identical contents, nothing gets written; no conflict."
- YOUNGGON K.11 years agoNew member | Level 1
Dear Steve,
Thank you for your kind comment.
I understood WriteMode policy.
I figured out how to use it.
Thank you.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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!