Skip to content

fix: return a validation error when an image upload arrives without a file - #4995

Merged
imorland merged 2 commits into
2.xfrom
im/avatar-upload-missing-file
Aug 27, 2026
Merged

fix: return a validation error when an image upload arrives without a file#4995
imorland merged 2 commits into
2.xfrom
im/avatar-upload-missing-file

Conversation

@imorland

@imorland imorland commented Aug 27, 2026

Copy link
Copy Markdown
Member

Guards the avatar and admin image upload endpoints against a request carrying no file part, so the user sees "The field is required." instead of the request failing with an unhandled TypeError, and stops the avatar picker posting a non-file in the first place.

@imorland imorland changed the title fix: return a validation error when an avatar upload arrives without a file [2.x] fix: return a validation error when an avatar upload arrives without a file Aug 27, 2026
@imorland imorland changed the title [2.x] fix: return a validation error when an avatar upload arrives without a file fix: return a validation error when an image upload arrives without a file Aug 27, 2026
@imorland imorland added this to the 2.0.0-rc.8 milestone Aug 27, 2026
@imorland
imorland marked this pull request as ready for review August 27, 2026 10:20
@imorland
imorland requested a review from a team as a code owner August 27, 2026 10:20
@imorland
imorland merged commit 2451581 into 2.x Aug 27, 2026
30 checks passed
@imorland
imorland deleted the im/avatar-upload-missing-file branch August 27, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant