Closed someren closed 3 years ago
Alternative: Increase the maximum upload size from 2/3 MB to 10-15MB. Pictures that are made on a smartphone are simply larger than a few MB...
The front-end contains a hardcoded minimum and maximum file size for the attachment. Minimum: 30 KB, Maximum: 8 MB.
When a users selects an image larger or smaller than these bounds, the file is not accepted and a message is shown immediately (screenshot Amsterdam acceptance environment):
Within the Amsterdam acceptance environment I can succesfully upload a 3,8 MB file.
@tcoenen @bartjkdp Is the min/max size of a file configurable in the Backend? Is this perhaps configured with a different value in the Den Bosch config?
API_MAX_UPLOAD_SIZE
is a backend setting which can be set through an environment variable.
tested with production environment of 's-Hertogenbosch on Android phone with Chrome mobile: photo can be added in environment directly from the camera. Error occurs when sending the complete signal.
seems the front- and backend limitations are not in sync. This should be part of documentation for deployment?
@joostvkempen thanks for testing!
The problem was not in the Signalen frontend or backend, but in the loadbalancer in front. It limited requests to 2MB.
I created a fix in the Helm Charts and deployed this to the 's-Hertogenbosch environments.
Describe the bug There is a maximum size an attachment can have. I do not know the exact maximum but 2.5MB is too large. After selecting the attachment I continue answering the follow up questions, phone number, e-mailadres etc. However, only after clicking "Send" I get a error message: Het uploaden van de foto is niet gelukt. The ticket is added to Signalen but without attachment. I would like to have received this information sooner, immediatly after selecting/uploading the attachment.
To Reproduce Steps to reproduce the behavior:
Expected behavior Immediatly after selecting/uploading an attachment a message or warning should appear that the attachment is too large to be uploaded. Important information is lost and cannot be added by the melder.
Screenshots
Desktop (please complete the following information):