Skip to content

[stable33] fix(templates): handle upload errors properly - #6207

Merged
elzody merged 6 commits into
stable33from
backport/6076/stable33
Oct 19, 2026
Merged

elzody merged 6 commits into
stable33from
backport/6076/stable33

Conversation

@backportbot

@backportbot backportbot Bot commented Oct 19, 2026

Copy link
Copy Markdown

Backport of PR #6076

When trying to upload a global template that failed (e.g. file was too
large), it would try to detect the MIME type of the file even if it
didn't exist, causing a 500 Internal Server Error response. Instead, we
should check for errors first, and then try to detect the MIME type only
after we know there are no errors.

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Assisted-by: ClaudeCode:claude-opus-5
Distinguish between an upload that failed and an upload that simply
contained nothing

Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Assisted-by: ClaudeCode:claude-opus-5
@backportbot
backportbot Bot requested review from elzody and juliusknorr October 19, 2026 17:46
@backportbot backportbot Bot added bug Something isn't working 3. to review Ready to be reviewed labels Oct 19, 2026
On stable33 the @nextcloud/dialogs library is on v6, but the test
assertions were done with v7 in mind on main. So they need to be
adjusted to correctly identify the toast message and assert that the
content matches

Signed-off-by: Elizabeth Danzberger <elizabeth@elzody.dev>
Assisted-by: ClaudeCode:claude-opus-5
@elzody
elzody merged commit 51944ab into stable33 Oct 19, 2026
63 checks passed
@elzody
elzody deleted the backport/6076/stable33 branch October 19, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Ready to be reviewed bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant