Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
app permission type: App folder
API version: dropbox API v2
description: API "upload_session_finish" with mode:update error
------
Have no idea how the "update mode" works (how it works with "rev" param?).
Thanks for your help!
screen_shot_01:
screen_shot_02:
--------------
Console logs:
curl -X POST https://content.dropboxapi.com/2-beta-2/files/upload_session/finish --header 'Authorization: Bearer <token>' --header 'Content-Type: application/octet-stream' --header 'Dropbox-API-Arg: {"cursor":{"session_id":"<session_id>","offset":14659},"commit":{"path":"/test_upload2.png","mode":"update"}}'
Error in call to API function "files/upload_session/finish": HTTP header "Dropbox-API-Arg": commit.mode: expected object for 'update', got symbol
-------------
curl -X POST https://content.dropboxapi.com/2-beta-2/files/upload_session/finish --header 'Authorization: Bearer <token>' --header 'Content-Type: application/octet-stream' --header 'Dropbox-API-Arg: {"cursor":{"session_id":"<session_id>","offset":14659},"commit":{"path":"/test_upload2.png","mode":"update", "rev": "xxxx"}}'
Error in call to API function "files/upload_session/finish": HTTP header "Dropbox-API-Arg": commit: unknown field 'rev'
-------------
curl -X POST https://content.dropboxapi.com/2-beta-2/files/upload_session/finish --header 'Authorization: Bearer <token>' --header 'Content-Type: application/octet-stream' --header 'Dropbox-API-Arg: {"cursor":{"session_id":"<session_id>","offset":14659},"commit":{"path":"/test_upload2.png","mode":"update"}, "rev": "xxxx"}'
Error in call to API function "files/upload_session/finish": HTTP header "Dropbox-API-Arg": unknown field 'rev'
curl -X POST https://content.dropboxapi.com/2-beta-2/files/upload_session/finish --header 'Authorization: Bearer <token>' --header 'Content-Type: application/octet-stream' --header 'Dropbox-API-Arg: {"cursor":{"session_id":"<session_id>","offset":1048576},"commit":{"path":"/test_upload2.png","mode": {"update": "aaa"}}}'
Error in call to API function "files/upload_session/finish": HTTP header "Dropbox-API-Arg": commit.mode: missing '.tag' key
----------
curl -X POST https://content.dropboxapi.com/2-beta-2/files/upload_session/finish --header 'Authorization: Bearer <token>' --header 'Content-Type: application/octet-stream' --header 'Dropbox-API-Arg: {"cursor":{"session_id":"<session_id>","offset":1048576},"commit":{"path":"/test_upload2.png","mode": {"update": "aaa", ".tag": "rev"}}}'
Error in call to API function "files/upload_session/finish": HTTP header "Dropbox-API-Arg": commit.mode: unknown tag 'rev'
-----------
Could you show me the document of this API?
But not this one: https://www.dropbox.com/developers/documentation/http#documentation-files-upload_session-finish
Well, so this works:
"mode": {".tag": "update", "update": "xxxx"}
Hi David, apologies that the documentation and explorer aren't clear on how to use that. I'll send that along as feedback to get that fixed up. I'm glad to see you sorted this out already though.
You'll need a little bit more luck to work smoothly with API v2.
: )
Hi there!
If you need more help you can view your support options (expected response time for a 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!