Skip to content

Comments

feat(fileupload): added toast for file upload size limit error#575

Open
raizasafeel wants to merge 1 commit intofrappe:mainfrom
raizasafeel:file-size-toast-for-upload
Open

feat(fileupload): added toast for file upload size limit error#575
raizasafeel wants to merge 1 commit intofrappe:mainfrom
raizasafeel:file-size-toast-for-upload

Conversation

@raizasafeel
Copy link
Contributor

@raizasafeel raizasafeel commented Feb 4, 2026

Summary

  • Move 'finish' to fire after server response instead of after upload completes
  • Add toast notification for file size limit errors (413), log other errors to console
Screenshot 2026-02-04 at 3 10 23 PM Screenshot 2026-02-06 at 12 11 49 PM

Issue

this.error = errorMessage

// Show toast only for file size limit errors, console log others
if (error?.httpStatus === 413) {
Copy link
Member

@pateljannat pateljannat Feb 9, 2026

Choose a reason for hiding this comment

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

Maybe toast and console.error should be shown for all types of errors. In other cases too, if we just show console.error, the end user gets no idea that something is failing.


// Show toast only for file size limit errors, console log others
if (error?.httpStatus === 413) {
toast.error(errorMessage)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be in app facing code and not core library? Developer might decide to show the error "inline" instead of a toast. The example you show in the PR description is a good example of this, if the dialog button triggers the upload error, it's better to show the error inside the dialog.

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.

no UI feedback when uploaded file is too large

3 participants