feat(filemanager): add download all button and 4GB archive size warning/disable#333
feat(filemanager): add download all button and 4GB archive size warning/disable#333OnAirGame wants to merge 5 commits intocloudreve:masterfrom
Conversation
…e for large files Add a "Download all" option that fetches all files in the current folder (bypassing pagination) and triggers the existing download flow. On share pages, a visible "Download folder" button appears in the toolbar for easy access by share recipients. On the main file manager, the option is available in the more actions menu (hidden in trash view). Also disable the browser-side archiving option in the archive method picker when total selected file size exceeds 4 GB, showing the actual size and explaining the limit. - Add downloadAllFiles thunk with full pagination support - Add "Download folder" button to share page toolbar (NavHeader) - Add "Download all" to more actions menu (MoreActionMenu) - Add disabled state support to SelectOption dialog - Add i18n strings for new UI text Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| <RadiusFrame> | ||
| <TopActions /> | ||
| </RadiusFrame> | ||
| {showDownloadFolder && ( |
There was a problem hiding this comment.
This existing download works for selecting a folder from the parent, but if I'm inside a folder or shared folder there is no way to download all files. "Select all" only selects the current page due to pagination.
For a client, or a recipient of a link, I think it's important to have a one click 'download all' or 'download folder' button, especially in cases when there are lots of files being sent (for example a photo gallery from a job with 500 photos in it etc).
Similar services like frame.io and Dropbox have this feature for share pages specifically as a client or customer receiving a link they need an option to be able to download all the contents of the folder with one click.
There was a problem hiding this comment.
Have made some tweaks to the UI/UX for this section, let me know if you like any of this flow
Mobile layout: The "Download folder" button now shows icon-only on mobile and text + icon on desktop, with a small animation.
No duplicate buttons: The download folder button automatically hides when files are selected, since the navbar's FileSelectedActions already provides a download button for selections (on mobile)
File summary in archive method dialog: The "Select archive method" dialog now shows a subtitle with the file/folder count and total size (e.g. "2 files · 4.5 GB"), giving users context about what they're downloading before they pick a method. This is a generic enhancement to SelectOption - added optional subtitle support that any dialog can use.
| }; | ||
| } | ||
|
|
||
| export function downloadAllFiles(index: number): AppThunk { |
There was a problem hiding this comment.
Maybe we can make a small change in backend to allow calculate total size on root file
{"code":403,"msg":"Not supported action","error":"cannot operate root file","correlation_id":""}
And then we can calculate the file size on server side and re-use the browserBatchDownload.
There was a problem hiding this comment.
Nice, cleaner approach. want me to wait for the backend change, or is the current frontend pagination approach OK for now?
There was a problem hiding this comment.
Hi, I have raise a new pull request to backend, you may remove the pagination approach after it is merged.
There was a problem hiding this comment.
I can update to use this once merged
Co-authored-by: Darren Yu <YDL@YUDONGLING.NET>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…d dialog - Hide download folder button when files are selected (avoids duplicate with navbar download button) - Show icon-only on mobile, text + icon on desktop - Smooth horizontal collapse animation on button show/hide - Add file/folder count and total size subtitle to archive method dialog - Add generic subtitle support to SelectOption dialog - Remove unnecessary fetchFiles wrapper - Add i18n keys for file/folder counts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>


Closes cloudreve/cloudreve#3397
Summary
Add a "Download all" option that fetches all files in the current folder (bypassing pagination) and triggers the existing download flow. Also disable the browser-side archiving option when total file size exceeds 4 GB.
Download button placement
Details
Download all / Download folder
downloadAllFilesthunk fetches all files with full pagination support (page_size: 1000, matching existingwalk()pattern)4 GB browser archive limit
disabledsupport toDialogSelectOptionandSelectOptiondialogFiles changed
src/redux/thunks/download.tsdownloadAllFilesthunk, 4 GB limit logicsrc/component/FileManager/TopBar/NavHeader.tsxsrc/component/FileManager/TopBar/MoreActionMenu.tsxsrc/component/Dialogs/SelectOption.tsxdisabledprop supportsrc/redux/globalStateSlice.tsdisabledfield onDialogSelectOptionpublic/locales/en-US/application.jsonTest plan