You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Web servers are generally configured to only accept files under a certain limit. For Central, that limit was 20MB in versions prior to 1.1 and for v1.1+ the default nginx config sets the limit to 100MB. Currently the error message displayed on submission when an attachment larger than the threshold is submitted is raw from the server which is ugly and not very helpful:
Steps to reproduce the problem
Submit an attachment >100MB to a Central server such as https://demo.getodk.org. ~30s of uncompressed video generally gets above that threshold.
Expected behavior
We know for sure that a 413 means the payload was too large so we can provide a helpful, localized message. The ideal would be something like "This submission includes an attachment of type %1$s which is too big (%2$sMB) to be accepted by the server at %3$s. Please resize the attachment or contact the person who asked you to collect data."
%1$s the extension of the file that failed
%2$s the size of the file in MB
%3$s the server DOMAIN (not the full submission URL)
Note that it doesn't include the filename because the filename is a timestamp so will not be recognizable to the user. Hopefully the file type gives enough information.
Other information
See FormSourceExceptionMapper and how the exception types it knows are generated for ideas on how to structure this addition.
Problem description
Web servers are generally configured to only accept files under a certain limit. For Central, that limit was 20MB in versions prior to 1.1 and for v1.1+ the default nginx config sets the limit to 100MB. Currently the error message displayed on submission when an attachment larger than the threshold is submitted is raw from the server which is ugly and not very helpful:
Steps to reproduce the problem
Submit an attachment >100MB to a Central server such as https://demo.getodk.org. ~30s of uncompressed video generally gets above that threshold.
Expected behavior
We know for sure that a 413 means the payload was too large so we can provide a helpful, localized message. The ideal would be something like "This submission includes an attachment of type %1$s which is too big (%2$sMB) to be accepted by the server at %3$s. Please resize the attachment or contact the person who asked you to collect data."
Note that it doesn't include the filename because the filename is a timestamp so will not be recognizable to the user. Hopefully the file type gives enough information.
Other information
See FormSourceExceptionMapper and how the exception types it knows are generated for ideas on how to structure this addition.
We recently addressed this in Central frontend - getodk/central#178.
The text was updated successfully, but these errors were encountered: