Conversation
Deploying geodatalytics with
|
| Latest commit: |
0e01660
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://71a69b2b.geodatalytics.pages.dev |
| Branch Preview URL: | https://upload-size-limit.geodatalytics.pages.dev |
BryonLewis
left a comment
There was a problem hiding this comment.
This all depends on the time crunch involved. This is really only a client-side check for the uploading of files that should be sufficient for most users but if someone wanted to work around it, they could. Depending on the time involved a better option may be to handle it on the back-end.
You could overrride the initialize_upload in s3-file-field: https://github.com/kitware-resonant/django-s3-file-field/blob/master/s3_file_field/views.py#L84
And look at the UploadInitializationRequestSerializer and the file_size in there. You can also see that in the function a UploadTooLargeError is coming from multipart.py if the file is larger than the max supported size (50tb for minio and 5tb for s3)
I'm fine with the client-side logic for a temporary fix for the demo if there are time concerns
|
Agreed, this provides no security for the server, it's just precautionary warning for typical users. To prevent DOS vulnerabilities, we'd want server enforcement. |
Resolves #301