-
Notifications
You must be signed in to change notification settings - Fork 158
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
Use pre-signed URLs to download files #3797
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
fab719d
to
7a45dd7
Compare
Trying to download files with oCIS results in |
I included a fetch with method |
added QA team label to look into the tests |
d65f97f
to
f284c43
Compare
Ocis tests are failing with this logs in server
Something with the number of segments. |
@LukasHirt does this feature work with oc10 too? I was unable to reproduce the failure in CI, but when I try to download the file from the UI it sends the request to |
Adapted this
Not supported in oc10 (edit: up to 10.4), but the code was not taking the signing capability into consideration. That is fixed now, please retry. In oc10 without signing capability the download should again fall back to the BLOB based download (which is limited to 2GB). In ocis, the signing capability is enabled, so ocis-web will trigger a download with presigned url. |
@butonic @IljaN @LukasHirt please test and review, thanks! |
@kulmann Looks like signing url works in oc10 (git master which we use in CI) owncloud/core#37634. |
@kulmann would maybe this endpoint help with the issue of files being opened? |
Wow.... @dpakach you're right, since owncloud core 10.5, downloads don't have a content disposition header anymore. Because of that, the respective file gets opened directly in the browser. It only worked in phoenix so far, because without presigned urls we were using blobs for download, without minding the content disposition header. Investigating... |
Please only use this endpoint for zipped download - any other download must go via the webdav endpoints |
Ok, then I won't bother trying, thanks! @DeepDiver1975 do you happen to have an idea why the |
Wow 😱 Thank you @DeepDiver1975, that was it! 🤯 |
Probably CI running with debug enabled as well... |
for some more digging to understand what is causing the change in behavior follow owncloud/core#25254 (comment) |
@individual-it could you clarify why we need the However, if it is set to true the download tests against oc10.5 are failing because of what owncloud/core#25254 (comment). Also, we should probably introduce a test suite for download tests with oc10.4, as those behave different than downloads on oc10.5:
At the moment we're blocked, CI needs to be changed somehow... |
2eb9058
to
fd79c5a
Compare
the debug mode is needed for https://github.com/owncloud/openidconnect/blob/bbaaa9cb6e5bd8d9993701db5d7df03312a34087/lib/Client.php#L69-L71
|
created owncloud/openidconnect#89 to separate the certificate checking configuration from debug mode |
@jasson99 @individual-it with owncloud/openidconnect#89 it should be possible to switch from
to
|
20f7b4c
to
4654393
Compare
The HEAD request has to run on the non-signed URL. If the file exists we can continue to kick off the download on the signed URL.
File version download was only supporting signed url downloads. Blob downloads are still needed when the backend doesn't support url signing.
4654393
to
2a2f9f7
Compare
bb4e5e0
to
e2811c3
Compare
Description
Get URL of the file, use sdk to pre-sign it and then download the file via it.
Motivation and Context
No need to fetch the files first.
Types of changes