Skip to content

fix: Use POST instead of GET for multi-file downloads - #56543

Open
nfebe wants to merge 3 commits into
masterfrom
fix/7935/download-uri-too-long
Open

nfebe wants to merge 3 commits into
masterfrom
fix/7935/download-uri-too-long

Conversation

@nfebe

@nfebe nfebe commented Nov 19, 2025

Copy link
Copy Markdown
Contributor

When downloading multiple files as a ZIP archive, filenames were appended to the URL as query parameters, causing "414 Request-URI Too Long" errors with many files.

Backend now supports POST requests with files in request body. Frontend sends files via FormData in POST body instead of URL params.

Fixes #7935

@CarlSchwan
CarlSchwan force-pushed the fix/7935/download-uri-too-long branch from 87e9ed2 to 67f9615 Compare October 8, 2026 15:53
@CarlSchwan
CarlSchwan marked this pull request as ready for review October 8, 2026 15:54
@CarlSchwan
CarlSchwan requested review from a team and skjnldsv as code owners October 8, 2026 15:54
@CarlSchwan
CarlSchwan requested review from Altahrim, kristian-zendato, leftybournes, pringelmann, provokateurin and salmart-dev and removed request for a team October 8, 2026 15:54
@CarlSchwan CarlSchwan added 3. to review Waiting for reviews and removed AI assisted labels Oct 8, 2026
@CarlSchwan CarlSchwan self-assigned this Oct 8, 2026
// Send the file list in the request body to avoid too long URLs.
// A native form submission lets the browser stream the archive to disk.
const form = document.createElement('form')
form.method = 'POST'

@pringelmann pringelmann Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested locally: zipping a folder that contains a view-only share returns a 403 here. With a form submit, wouldn't the browser end up on that error page instead of staying in Files?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a bit tricky, I will try to figure out a solution

Comment thread apps/files/src/actions/downloadAction.ts
Comment thread apps/dav/lib/Connector/Sabre/ZipFolderPlugin.php
nfebe and others added 3 commits October 14, 2026 11:47
When downloading multiple files as a ZIP archive, filenames were
appended to the URL as query parameters, causing "414 Request-URI
Too Long" errors with many files.

Backend now supports POST requests with files in request body.
Frontend sends files via FormData in POST body instead of URL params.

Fixes #7935

Signed-off-by: nfebe <fenn25.fn@gmail.com>
Downloading the archive through axios as a blob buffered the whole
archive in memory and then failed, as HEAD requests on blob URLs are
not allowed. Submit a hidden form instead so the browser streams the
download natively.

Also reject non-string `files` parameters instead of failing with a
TypeError.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zip downloads: 414 Request-URI Too Long at download in web-interface

4 participants