Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

put target argument not working properly #52

Open
grantseltzer opened this issue Sep 8, 2016 · 4 comments
Open

put target argument not working properly #52

grantseltzer opened this issue Sep 8, 2016 · 4 comments

Comments

@grantseltzer
Copy link
Contributor

I would assume based on the following help text that put can take a source (local file) argument, and/or an argument that represents a location on the users dropbox account for the file to go.

[*] dbxcli put --help
Upload files

Usage:
  dbxcli put [flags] <source> [<target>]

Global Flags:
      --as-member string   Member ID to perform action as
  -v, --verbose            Enable verbose logging

Instead, if a second argument is specified, the source is uploaded to the root of the dropbox account and is renamed to the second argument.

@diwakergupta is this how it was intended to be used and I'm just misinterpreting the help text?

I don't think the way it works now is very necessary. I'd like to add multiple arguments (including running them concurrently) and add a flag for destination which can specify a particular path to put all the arguments in.

@grantseltzer grantseltzer changed the title put not working as advertised put target argument not working properly Sep 8, 2016
@waits
Copy link
Contributor

waits commented Sep 9, 2016

Hmm, git blame says that I wrote that usage text. Apparently I was basing it off out how put intuitively should work, instead of how it actually works.

It doesn't necessarily upload it to the root, it just makes the full path to the file whatever the target argument is. I guess it works correctly, in a sense, as long as you include the intended filename on the end of the target path. Otherwise it... overwrites the target folder with a file of the same name? Odd.

I can take a look at what's going on here unless you're planning on redoing put anyways.

@grantseltzer
Copy link
Contributor Author

I don't think the issue is the help text, I think the behaviour should match what you wrote. Another issue is that it overwrites existing files/directories which I think should cause an error instead (Possibly have a force flag to overwrite).

I'm working on this now, but I'm interested to see what @diwakergupta has to say before submitting a PR.

@grantseltzer
Copy link
Contributor Author

@diwakergupta Is there any documentation about how many upload requests the dropbox api can take? I have this working great except if there's a lot of files being passed as arguments at the same time in which case I get errors because of too many upload attempts.

@grantseltzer
Copy link
Contributor Author

I made a PR with my changes in #54, that would be a good place to continue this discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants