dropbox / dbxcli

A command line client for Dropbox built using the Go SDK
Other
1.05k stars 101 forks source link

Could not able to copy a tar.gz file in my dropbox folder #69

Closed coolbrg closed 7 years ago

coolbrg commented 7 years ago

Unable to copy the ...tar.gz into my dropbox folder.

$ dbxcli cp -v openshift-origin.tar.gz technical_stuff
2017/04/06 19:17:04 client.go:411: arg: &{{/openshift-origin.tar.gz /technical_stuff/openshift-origin.tar.gz} false false}
2017/04/06 19:17:04 client.go:428: req: &{POST https://api.dropboxapi.com/2/files/copy HTTP/1.1 1 1 map[Content-Type:[application/json]] {0xc420019ec0} 0x6547d0 140 [] false api.dropboxapi.com map[] map[] <nil> map[]   <nil> <nil> <nil> <nil>}
2017/04/06 19:17:05 client.go:432: resp: &{409 Conflict 409 HTTP/1.1 1 1 map[Content-Type:[application/json] Content-Length:[117] Connection:[keep-alive] X-Dropbox-Request-Id:[cb0a7425e1f65da432f721bba73a62d6] Server:[nginx] Date:[Thu, 06 Apr 2017 13:47:05 GMT]] 0xc420126100 117 [] false false map[] 0xc42000ac00 0xc4201762c0}
2017/04/06 19:17:05 client.go:445: body: {"error_summary": "from_lookup/not_found/..", "error": {".tag": "from_lookup", "from_lookup": {".tag": "not_found"}}}
Copy error: &{{/openshift-origin.tar.gz /technical_stuff/openshift-origin.tar.gz} false false}
diwakergupta commented 7 years ago

@budhrg I think I know what happened here -- we can definitely improve the documentation!

Basically, cp is meant to to copy files that already exist in your Dropbox to another location in your Dropbox. If you want to upload a new file in your Dropbox, use put instead.

Hope that helps! LMK if that works and I can close this out. Of course, appreciate any PRs to improve the documentation!