Skip to content

Conversation

Ivan-Shaml
Copy link

(Prerequisite: podkrepi-bg/api#700)

Currently the API supports an allow list for mime types and file extensions, for all the endpoints which support file upload.

However the front-end lacks in this area:

  • If file upload fails, on many places appropriate message, is not shown to the user
  • We know the supported mime types, but don't enforce them on the FileUpload component. This creates a gap, where user can upload unsupported file format and create an error.

Motivation and context

Continuation of podkrepi-bg/api#700
Trying to improve the UX of users when uploading files.

Screenshots:

Before After
image image

Testing

Steps to test

(Prerequisite: need to be running this version of the API podkrepi-bg/api#700)

  1. Add file type to the allow list (e.g. application/x-msdownload) in FileUpload.tsx
  2. Upload an exe file
  3. See the error notification

Affected urls

Environment

New environment variables:

None

New or updated dependencies:

None

Copy link

❌ Not all tests have run for this PR. Please add the run tests label to trigger them.

@Ivan-Shaml Ivan-Shaml marked this pull request as ready for review September 15, 2025 08:32
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.

1 participant