-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat(website): show a meaningful error if uploaded file is too large #1634
base: main
Are you sure you want to change the base?
Conversation
@@ -423,6 +423,11 @@ function handleError(onError: (message: string) => void, action: Action) { | |||
case 400: | |||
onError('Failed to submit sequence entries: ' + error.response.data.detail); | |||
return; | |||
case 413: | |||
onError( | |||
'The uploaded file was too large. Please compress the file or split it into smaller submissions.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know where we configure how large is too large? It would be nice to give as specific a response as possible - e.g. "the maximum allowed size is X MB"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been also wondering.. I found a config in the backend which however seems to allow 5 GB. Maybe (for our non-local deployments) there is some web server in Kubernetes that sets a more strict limit by default? Do you understand what we have between the backend and the public internet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #1635
e5cbe92
to
5d200ff
Compare
As in #1635 (comment) it seems like this likely relates to CloudFlare. (You could see if it happens locally) |
cdc6de1
to
f8ba992
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice small fix! Just the docs and numbers are a bit off.
The duplicated number is a bit brittle; maybe we can also add a doc-string in the application.properties to update the UI?
Or could we even have this in our values.yaml and have it forwarded to both configs?
// This should be the same value as defined in the backend. | ||
const MAX_UPLOAD_SIZE = '800 MB'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you be more specific; is it this property? spring.servlet.multipart.max-file-size
?
Also, it looks like the PR sets this property to 200MB, so they are not the same.
resolves #1226
preview URL: https://1226-file-too-big-error.loculus.org
Summary
Screenshot
PR Checklist
This is blocked by #1635 because the web application cannot see the response status due to CORS errors.