Skip to content

Use Guzzle stream to download files from GDrive - #21732

Merged
DeepDiver1975 merged 1 commit into
masterfrom
gdrive-stream-download
Jan 18, 2016
Merged

DeepDiver1975 merged 1 commit into
masterfrom
gdrive-stream-download

Conversation

@PVince81

Copy link
Copy Markdown
Contributor

The API library does not support streaming and always reads the full
file into memory.

This workaround copies the signed headers to a Guzzle request and
returns the response as stream.

Inspired by @icewind1991's approach for DAV: #18653

Before: (the download takes a while to start due to temp storage)

  % curl "http://root:admin@localhost/owncloud/remote.php/webdav/gdrive/direct%20upload/BigBuckBunny_320x180.mp4" -o test_master.mp4
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 61.6M  100 61.6M    0     0   352k      0  0:02:59  0:02:59 --:--:-- 16.6M

After:

  % curl "http://root:admin@localhost/owncloud/remote.php/webdav/gdrive/direct%20upload/BigBuckBunny_320x180.mp4" -o test.mp4
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 61.6M  100 61.6M    0     0   712k      0  0:01:28  0:01:28 --:--:--  785k

Fixes the download part of #21357

Please review @icewind1991 @Xenopathic

The API library does not support streaming and always reads the full
file into memory.

This workaround copies the signed headers to a Guzzle request and
returns the response as stream.
@mention-bot

Copy link
Copy Markdown

By analyzing the blame information on this pull request, we identified @Xenopathic, @MTGap and @icewind1991 to be potential reviewers

@PVince81 PVince81 added this to the 9.0-current milestone Jan 14, 2016
@karlitschek

Copy link
Copy Markdown
Contributor

nice 👍

@PVince81

Copy link
Copy Markdown
Contributor Author

@MorrisJobke

@icewind1991

Copy link
Copy Markdown
Contributor

Looks good 👍

@PVince81

Copy link
Copy Markdown
Contributor Author

@karlitschek backport to 8.2.2 at least ?

@karlitschek

Copy link
Copy Markdown
Contributor

backport is fine if this is fully tested. 👍

@PVince81

Copy link
Copy Markdown
Contributor Author

@davitol mind doing another test for this PR ? The only test needed is downloading, see original post. Maybe spice it up a bit with encryption and shares 😄

DeepDiver1975 added a commit that referenced this pull request Jan 18, 2016
Use Guzzle stream to download files from GDrive
@DeepDiver1975
DeepDiver1975 merged commit a32f8aa into master Jan 18, 2016
@DeepDiver1975
DeepDiver1975 deleted the gdrive-stream-download branch January 18, 2016 13:16
@PVince81

Copy link
Copy Markdown
Contributor Author

stable8.2: #21825

@lock

lock Bot commented Aug 6, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants