feat(files_sharing): Improve user experience when user attempts to download folder with non-downloadable files#57335
feat(files_sharing): Improve user experience when user attempts to download folder with non-downloadable files#57335
Conversation
f5ab743 to
fc61b22
Compare
come-nc
left a comment
There was a problem hiding this comment.
I do not understand the PR, it checks the same files twice, once as paths, once as nodes?
Why is that needed? Why was it not working before?
975782e to
17b40e1
Compare
Good question, but I don't know. For some reason we're still able to download non-downloadable files using workarounds that I explained in the PR description. I've double-tested it on Regarding duplicated checks - I've added one more commit that simplifies this. So, now we recursively collecting files to download only once and perform check only once. Also in previous implementation non-downloaded files break whole download (check not works, but idea was the same). Now we're just skipping such files and not break download process. |
13673e9 to
26992d1
Compare
34a4eda to
ed1a86a
Compare
|
@susnux @AndyScherzinger guys, can you take a look on it, please? |
ed1a86a to
d86267b
Compare
There was a problem hiding this comment.
If we create such an array and pass it along I could imagine we run into memory limits here with very large directory structures. Would it make sense to rather pass the generator itself?
There was a problem hiding this comment.
yeah, I thought about that too. Refactored, I hope laziness will work, please check
juliusknorr
left a comment
There was a problem hiding this comment.
Code wise this makes sense and solves the issue 👍
Just one comment left
3879126 to
b17fea7
Compare
…wnload folder with non-downloadable files Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
…wnload folder with non-downloadable files (optimized approach using generators) Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
b17fea7 to
b86d483
Compare
|
@juliusknorr I've updated PR description. Actually fix itself done in mentioned PR. But this PR improves behavior |
This PR is continuation of the recently merged #57573.
Current
masterbranch requires to perform recursive iteration twice:With this PR we recursively iterating only once as checks performed right before node added to archive.
But that's not all. Current
masterbranch not allows download anything if downloaded folder contains at least 1 non-downloadable file. With this PR non-downloadable files are just excluded from the archive. At the same downloadable files added to it.TODO
Checklist
3. to review, feature component)stable32)