Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Client-side validation of file size #136

Open
4 tasks
ARMmaster17 opened this issue Feb 20, 2022 · 1 comment
Open
4 tasks

Client-side validation of file size #136

ARMmaster17 opened this issue Feb 20, 2022 · 1 comment
Labels
bug Something isn't working Frontend Changes are expected to be made to HTML/JS/CSS files and the related controllers.

Comments

@ARMmaster17
Copy link
Member

ARMmaster17 commented Feb 20, 2022

Summary

As of right now, as part of the OWASP recommendations for websites, we do not allow uploads of files of arbitrary sizes. Instead the underlying Tomcat server caps the size of all incoming multipart file uploads to 4 MB. The front-end currently has no knowledge of this, and uploading of a file bigger than 4 MB will lead to a strange error.

Blocked by #26 and #57

Implementation

  • Add client-side validation on file upload fields that blocks uploads larger than 4 MB.
  • Add a helpful error message when the file is too large.
  • Write E2E test that creates a randomly generated file larger than 4 MB and attempts to upload it.
  • (OPTIONAL) Modify the upload size limit in src/main/resources/application.yml (see comments).

Comments

  • The 4 MB size limit is defined by us, and we can change it if needed. It might be a good idea to look at the rough size of a ~5 page PDF documents with words and images and adjust this limit accordingly.
@ARMmaster17 ARMmaster17 added bug Something isn't working blocked This issue is blocked by a pending PR or another issue that must be resolved first. Frontend Changes are expected to be made to HTML/JS/CSS files and the related controllers. labels Feb 20, 2022
@ARMmaster17 ARMmaster17 added this to the Sprint 2 milestone Feb 20, 2022
@ARMmaster17 ARMmaster17 moved this to Committed in Kanban Board Feb 20, 2022
@ARMmaster17 ARMmaster17 removed the blocked This issue is blocked by a pending PR or another issue that must be resolved first. label Feb 23, 2022
@ARMmaster17
Copy link
Member Author

Moving this to sprint three, as since we're probably going to do a controlled demo, we don't need this until the final presentation.

@ARMmaster17 ARMmaster17 removed this from the Sprint 2 milestone Mar 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Frontend Changes are expected to be made to HTML/JS/CSS files and the related controllers.
Projects
Status: Committed
Development

No branches or pull requests

1 participant