Uh oh!
There was an error while loading. Please reload this page.
perf(s3): Provide direct pre-signed download link - #54436
Conversation
invario
commented
Aug 17, 2025
FYI I've been working on #53634 to enable previews to generate by passing a presigned URL to ffmpeg. |
ldpr
commented
Oct 18, 2025
very excited for this! it'll be a gamechanger for nextcloud users no longer being "choked" behind nextcloud proxying everything. can't wait! |
ser
commented
Oct 22, 2025
I am also super excited, as it would allow to distribute data geographically with several auto mirroring minio instances across continents. Web browsers are automatically getting the file from the shortest round trip servers. |
volf3n
commented
Nov 5, 2025
Oh, this would be amazing for something I've been cooking up on the side! |
f9f2e9a to
3a04f90CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
lakema17
commented
Nov 11, 2025
Is there any way we can get a basic guide to testing this PR? I'm looking to get some basic performance data so I can plan my setup ahead of the release (and also have a bit of fun with it) |
09235cc to
fd292e4CompareCarlSchwan
commented
Nov 12, 2025
Best way is to test this PR is with nextcloud/nextcloud-docker-dev#431 just change in .env PRIMARY to minio and start it up with |
a9ac87c to
9fa3576Compare
artonge
left a comment
There was a problem hiding this comment.
- How is this behaving for files without read or download permissions?
- What happens if the object store is not available publicly?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
93cca86 to
e903621CompareCarlSchwan
commented
Nov 19, 2025
I added a check for read. For the download permissions, the downloadUrl dav properties is already completely disabled for shares.
This is opt-in an behavior. You need to mark 'use_presigned_url' to true in your config.php for the object store. I need to add it to the documentation |
e903621 to
d6bfac4Compareartonge
commented
Nov 19, 2025
Should we add a setup check to hint to this new possibility? |
ser
commented
Nov 19, 2025
I would propose to specify the URL instead, as the URL of the front S3 server might be and often is different than the one set internally |
ldpr
commented
Nov 20, 2025
Quick question.
Does this mean the actual download url provided to the user within nextcloud while using this PR is still proxied? |
ser
commented
Nov 29, 2025
@ldpr Have you set |
ldpr
commented
Nov 29, 2025
Yes, I really should have mentioned that, sorry. It's set within the S3 config block. |
This is faster than going back to nextcloud to download the files. This is an opt-in setting that can be enabled by setting use_presigned_url in the object store config. Additionally add support for the proxy config which is needed in a docker setup. See nextcloud/nextcloud-docker-dev#431 Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
d6bfac4 to
b6313f6CompareUh oh!
There was an error while loading. Please reload this page.
| * @return array{url: ?string, expiration: ?int}|false | ||
| * @since 33.0.0 | ||
| */ | ||
| public function getDirectDownloadById(string $fileId): array|false; |
There was a problem hiding this comment.
This is a breaking change for apps that provide a storage wrapper 🙈
Please document accordingly
There was a problem hiding this comment.
Indeed. Surprised me a bit while doing some groupfolders changes; thought it was my fault. ;-)
There was a problem hiding this comment.
Correction: the real issue was outdated stubs in gf repo that lacked this new method. All good now (at least in terms of fallback behavior).
What needs to be done further to use it? I upgraded to 33.0.0beta1 and enabled |
CarlSchwan
commented
Jan 8, 2026
If you do a raw PROPFIND request with e.g. curl and include In my dev setup, I do with a file |
ser
commented
Mar 19, 2026
Hmmm, I have set use_presigned_url to true but using above curl command I do not see that they are included. I am getting The desktop app is also not using the S3 server directly. How can I diagnose it further? Nextcloud 33.0.0.6 from NixOS patched with PR498820 |
ser
commented
Mar 27, 2026
Are you really sure it is working at all? When I add |
Summary
This is faster than going back to nextcloud and setting up the file system to download the files.
TODO
Currently in my dev docker setup, the minio service is not available from outside, so the url can't be accessed. There should be a way to configure whether the s3 service is available or not from outsideMinio + pre-signed urls nextcloud-docker-dev#431Also expose the preview url like this(let's move that to a seperate PR)Checklist