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

Use File Node API for more download cases, skip unreadable files #18433

Merged
merged 3 commits into from
Dec 19, 2019

Conversation

blizzz
Copy link
Member

@blizzz blizzz commented Dec 16, 2019

Follow up to #17822

@blizzz blizzz added this to the Nextcloud 18 milestone Dec 16, 2019
@blizzz blizzz changed the title User File Node API for more download cases, skip unreadable files Use File Node API for more download cases, skip unreadable files Dec 16, 2019
lib/private/Streamer.php Show resolved Hide resolved
lib/private/legacy/files.php Show resolved Hide resolved
@rullzer rullzer mentioned this pull request Dec 17, 2019
34 tasks
@blizzz
Copy link
Member Author

blizzz commented Dec 17, 2019

mh, some integration tests for download throw 404s and i can reproduce locally :/

@blizzz blizzz added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Dec 17, 2019
@rullzer
Copy link
Member

rullzer commented Dec 17, 2019

Lets restart them first

@rullzer
Copy link
Member

rullzer commented Dec 17, 2019

Nope we'll have to dive into that..

@blizzz
Copy link
Member Author

blizzz commented Dec 17, 2019

yeah, no surprise it fails for me, too… I'll dive, either a bit later, or tomorrow morning.

@blizzz blizzz added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Dec 17, 2019
@blizzz
Copy link
Member Author

blizzz commented Dec 17, 2019

first arg has to be full path, not just a name. works one folder down, but not deeper structures.

@blizzz
Copy link
Member Author

blizzz commented Dec 18, 2019

Passes now (apart from those MySQL timeouts)

*/
public function addDirRecursive($dir, $internalDir='') {
public function addDirRecursive(string $dir, string $internalDir = ''): void {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

passing the Node/FileInfo instead of the path here would be nice as it would cut the number of filecache queries in half

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing the Node would be more helpful, I agree and had the same thought. I discarded it to have a simpler and smaller changeset to backport.

@blizzz
Copy link
Member Author

blizzz commented Dec 18, 2019

/backport to stable17

@blizzz
Copy link
Member Author

blizzz commented Dec 18, 2019

/backport to stable16

@blizzz
Copy link
Member Author

blizzz commented Dec 18, 2019

/backport to stable15

@rullzer rullzer mentioned this pull request Dec 19, 2019
18 tasks
juliusknorr and others added 3 commits December 19, 2019 13:05
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* avoids a 403, but enables download of resources that are not restricted
* single file downloads still cause 403

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@blizzz blizzz added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Dec 19, 2019
@blizzz blizzz merged commit 59402bf into master Dec 19, 2019
@blizzz blizzz deleted the fix/noid/fsusage branch December 19, 2019 16:55
@backportbot-nextcloud
Copy link

backport to stable17 in #18488

@backportbot-nextcloud
Copy link

backport to stable16 in #18489

@backportbot-nextcloud
Copy link

The backport to stable15 failed. Please do this backport manually.

@blizzz
Copy link
Member Author

blizzz commented Dec 20, 2019

15 is EOL now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug feature: files feature: filesystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants