Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit upload size of images #33

Open
4 tasks
joelvdavies opened this issue Oct 4, 2024 · 0 comments
Open
4 tasks

Limit upload size of images #33

joelvdavies opened this issue Oct 4, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@joelvdavies
Copy link
Collaborator

joelvdavies commented Oct 4, 2024

Images should have a maximum upload size to avoid misuse, should be configurable like it is for attachments.

  • Reject image creation requests that pass a specific size
  • The maximum size should be configurable with the same default as the front end (currently 50MB at the time of writing)
  • We may also wish to consider adjusting the max_size used in the underlying SpooledTemporaryFile used via the UploadFile object if possible (see https://stackoverflow.com/questions/73442335/how-to-upload-a-large-file-%E2%89%A53gb-to-fastapi-backend) as depending on Generate and store image thumbnails #30 we may need the image to be fully in memory anyway and this should make the upload faster
  • Will need a larger and smaller image for e2e tests, one above the limit and one below (or we could potentially use faker/mock the data some other way?)
@joelvdavies joelvdavies added the enhancement New feature or request label Oct 4, 2024
@joelvdavies joelvdavies moved this from Backlog to Up Next in Inventory Management System Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Up Next
Development

No branches or pull requests

1 participant