eeditiones / tei-publisher-components

Web components used by TEI Publisher and apps generated by it
https://cdn.tei-publisher.com/
GNU General Public License v3.0
18 stars 14 forks source link

pb-upload should display message on an HTTP error 413 #171

Open GilShalit opened 8 months ago

GilShalit commented 8 months ago

Currently, when trying to load a file that is larger then what the web server (e.g. nginx) allows, the load operation is stopped with no message to the user, the name of the file is left on the component with a sand clock icon, indefinitly.

As can be seen in the console, nginx will send an error message: 413 (Request Entity Too Large).

I suggest that the component will watch out for a 413 message and will display a message like "The file being uploaded is too large. Please contact the administrator"). The file name and sand clock icon should probably be cleared.

Thanks!