Skip to content

Conversation

imsidkg
Copy link

@imsidkg imsidkg commented Sep 6, 2025

What?

This PR fixes misleading success messaging in the Admin UI when bulk file uploads contain one or more files that exceed the client_max_body_size (70 MB) enforced by NGINX. Previously, the oversized file(s) would be rejected with HTTP 413 at the proxy layer, but the UI still displayed a success state for the whole batch. After refresh, the file was absent (correct server behavior), but the messaging was incorrect.

Why?

Without this fix, Admin users receive false-positive success feedback, creating confusion and the impression that oversized files were uploaded when they were not. Accurate per-file error handling is critical for trust and usability in the media upload flow.

How?

  • Updated bulk upload handler to properly detect and surface 413 responses from NGINX.
  • When a file is rejected, the UI now shows a clear per-file error message:

    File size limit exceeded

  • For mixed batches, success/error counts are summarized (e.g., Failed to upload 1 file., Successfully uploaded 4 files ).
  • Single-file uploads remain unaffected (already correctly handled).

Before

  • Bulk upload including oversized file → success message for the batch.
  • Oversized file absent after refresh.

After

  • Bulk upload including oversized file → per-file error message + accurate summary.
  • Only valid files are marked success.
  • Watch this

Fixes #13650

@imsidkg imsidkg changed the title fix(admin): show correct error when bulk uploads exceed NGINX size limit fix(admin): show correct error when bulk uploads exceed NGINX size limit Sep 6, 2025
@imsidkg imsidkg changed the title fix(admin): show correct error when bulk uploads exceed NGINX size limit fix(ui): show correct error when bulk uploads exceed NGINX size limit Sep 6, 2025
@rezaarkan
Copy link

Is 70MB a hard limit defined somewhere?

I was under the impression that the limit can be adjusted in your nginx config as I've done that with mine.

@imsidkg
Copy link
Author

imsidkg commented Sep 7, 2025

Yup,you're right. It's a mistake from my side. I'm changing the required code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bulk upload shows “Success” when NGINX rejects PDFs >Allowed MB Size(413 Payload Too Large)
2 participants