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

Image upload crashes keystone if the file is too big for cloudinary #7984

Open
mmachatschek opened this issue Oct 6, 2022 · 0 comments
Open
Assignees
Labels
🐛 bug Unresolved bug

Comments

@mmachatschek
Copy link
Contributor

mmachatschek commented Oct 6, 2022

Please add steps to reproduce the problem

  1. checkout the ecommerce example
  2. add cloudinary keys (which have a default of 10MB on free plan and 20MB upload size max on paid plans set)
  3. run it
  4. login to the backend
  5. create a new product image
  6. use an image with >20 MB size
  7. try to upload it
  8. after a short time, the server exits with an cloudinary error that tells the user that the upload size is too big

image

Second related issue to this is setting a maxFileSize on the keystone server config.

  1. set keystone maxFileSize to <20MB
  2. try to upload an image with more than >20MB again
  3. the console shows an error about the maxFileSize configured on the server
  4. after a short time the server exits with an timeout error (probably keystone tries to upload the image in the background even though it got rejected because of the file size in the first place)

image

Please describe what you expected to happen:

  1. the server doesn't exit
  2. the server gracefully handles the error returned by cloudinary
  3. the server respects the file upload size correctly
  4. (maybe) it would be useful to users if the upload components on the admin side would already validate if the selected file/image exceeds the configured maxFileSize on the server

Please add contextual information such as your node version (node -v), or the web browser you used

  • I've tested this on the release tag 2022-09-20 and on main branch
  • node version 16.17.1
@mmachatschek mmachatschek changed the title Image upload breaks if the file is too big cloudinary Image upload crashes keystone if the file is too big for cloudinary Dec 19, 2022
@dcousens dcousens added the 🐛 bug Unresolved bug label Jan 17, 2023
@dcousens dcousens assigned dcousens and borisno2 and unassigned borisno2 and dcousens Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Unresolved bug
Projects
None yet
Development

No branches or pull requests

3 participants