Giter VIP home page Giter VIP logo

Comments (7)

diwakergupta avatar diwakergupta commented on May 29, 2024 1

How bizarre! thanks for reporting @slzarate , will take a look.

from dbxcli.

diwakergupta avatar diwakergupta commented on May 29, 2024 1

@slzarate I can confirm (and repro) the bug. We need to fix the underlying Go SDK for Dropbox APIs. I'll update here when the bug has been fixed. Thanks for your patience!

from dbxcli.

diwakergupta avatar diwakergupta commented on May 29, 2024 1

@slzarate makes sense. This is actually the intended behavior: get accepts a <source> and an optional <target>; if latter is missing, it uses the same name as the source in the local directory.

The "redirect" behavior you are trying to get from get foo > bar would only work if we write to stdout if no target was specified -- feel free to open a separate feature request for this. I'll go ahead and close this issue out as you are able to download JPGs.

from dbxcli.

diwakergupta avatar diwakergupta commented on May 29, 2024

@slzarate can you download the latest release (https://github.com/dropbox/dbxcli/releases/tag/v2.0.1) and try? I've verified the fix locally, but want to make sure it works for you before I close this out. Thanks!

from dbxcli.

slzarate avatar slzarate commented on May 29, 2024

@diwakergupta On both Mac and Linux I encounter no errors when downloading the various types of files I'm testing (PDF, JPG, PNG, TXT), but now the files are all empty.

from dbxcli.

diwakergupta avatar diwakergupta commented on May 29, 2024

Hmm @slzarate can you double check with the latest release? I don't see the same behavior:

$ ./dbxcli-darwin-amd64 version
dbxcli version: v2.0.1
SDK version: 1.0.0-beta
Spec version: 2dd2e0f

$ ./dbxcli-darwin-amd64 get -v test.jpg
2017/02/13 19:45:17 client.go:1126: arg: &{/test.jpg }
2017/02/13 19:45:17 client.go:1143: req: &{POST https://content.dropboxapi.com/2/files/download HTTP/1.1 1 1 map[Dropbox-Api-Arg:[{"path":"/test.jpg"}]] <nil> 0 [] false content.dropboxapi.com map[] map[] <nil> map[]   <nil> <nil> <nil> <nil>}
...
Downloading 148 KiB/148 KiB

$ ls -lhrt test.jpg
-rw-r--r--  1 diwaker  849048494   148K Feb 13 19:45 test.jpg

from dbxcli.

slzarate avatar slzarate commented on May 29, 2024

@diwakergupta Aha... I think I see the problem. That was a mistake in my testing. However, I have uncovered another bug: if I do get xxx.jpg > yyy.jpg (as I was testing earlier), it actually creates two files in the folder, xxx.jpg and yyy.jpg. However, yyy.jpg is an empty file (zero bytes). (Should I create a separate issue for this? It does work if you do get xxx.jpg > xxx.jpg.)

$ ./dbx version
dbxcli version: v2.0.1
SDK version: 1.0.0-beta
Spec version: 2dd2e0f
$ ./dbx get helsinki.jpg > not_helsinki.jpg
Downloading 1.5 MiB/1.5 MiB
$ ls -sh
total 17008
13936 dbx		 3072 helsinki.jpg	    0 not_helsinki.jpg

This bug is actually also present in v2.0.0:

$ ./dbx version
dbxcli version: v2.0.0
SDK version: 1.0.0-beta
Spec version: 2dd2e0f
$ ./dbx get cookbook.pdf > not_cookbook.pdf
Downloading 7.6 MiB/7.6 Mi
$ ls -sh
total 29456
15656 cookbook.pdf	13800 dbx		    0 not_cookbook.pdf

from dbxcli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.