dbxcli icon indicating copy to clipboard operation
dbxcli copied to clipboard

Unable to put a file to a folder

Open ghost opened this issue 6 years ago • 5 comments

What was the activity?

Upload a file from desktop to existing remote folder.

foobar@my_pc ~ $ dbxcli-linux-amd64 put Downloads/2019-05-20.pdf /bills-0000000000/ Uploading 32 KiB/32 KiB Error: path/conflict/folder/.. foobar@my_pc ~ $ dbxcli-linux-amd64 put Downloads/2019-05-20.pdf /bills-0000000000/. Uploading 32 KiB/32 KiB Error: json: cannot unmarshal object into Go value of type string foobar@my_pc ~ $ dbxcli-linux-amd64 put Downloads/2019-05-20.pdf /bills-0000000000 Uploading 32 KiB/32 KiB Error: path/conflict/folder/.

What was observed?

All commands failed to upload.

What is the version used?

dbxcli version: v3.0.0 SDK version: 5.4.0 Spec version: 097e9ba

What is the environment?

ClearLinux distro with Linux my_pc 5.0.17-765.native #1 SMP Mon May 20 17:08:30 UTC 2019 x86_64 GNU/Linux

What was expected?

File is put to the folder successfully.

What was the work around applied?

  1. Put the file to dropbox without any folder.
  2. Move the file to the destination folder.

ghost avatar May 22 '19 14:05 ghost

Another work around

Give the file name in the destination like dbxcli-linux-amd64 put Downloads/2019-05-20.pdf /bills-0000000000/2019-05-20.pdf

hsehdar avatar May 24 '19 09:05 hsehdar

Code observations

Function validatePath(p string) in root.go trims p always.

I suppose it should retain directory name if p has it. If p does not has prefix / then only prefix it.

ghost avatar May 26 '19 02:05 ghost

Code observations

Function put in put.go always takes base of first argument and prefixes with / irrespective of what the argument user passes.

ghost avatar May 26 '19 03:05 ghost

I hit this too. You can work around it by appending a filename to the target, but the bigger problem to me was that it did the full upload (15 GB) and then failed at the end.

Yostage avatar Jul 03 '20 17:07 Yostage

@Yostage I just hit the same issue. I uploaded 17 GB just to learn that I had to specify a filename, not just a directory, as the target.

mrichman avatar Jul 28 '20 20:07 mrichman