Skip to content
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

Error 413 after picuture upload in projects #356

Closed
rukala opened this issue May 12, 2017 · 8 comments
Closed

Error 413 after picuture upload in projects #356

rukala opened this issue May 12, 2017 · 8 comments
Labels
Type: Bug incorrect or uexpected behaviour

Comments

@rukala
Copy link

rukala commented May 12, 2017

After I uploaded a too big picture in the Bürgerhaushalt process on dev I got an Error 413 page instead of an error in the dashboard.
bildschirmfoto 2017-05-12 um 12 18 09

@rukala rukala added the Type: Bug incorrect or uexpected behaviour label May 12, 2017
@rukala
Copy link
Author

rukala commented May 12, 2017

When I upload a picture a second time (after error in dashboard) and it has the same filename, it's not uploaded after pressing save.

@rukala
Copy link
Author

rukala commented May 12, 2017

The same happens in all project-types. Also after navigating back from the error page and pressing save without selected image to upload, same error message occurs.

@rukala rukala changed the title Error 413 after picuture upload in Bürgerhaushalt Error 413 after picuture upload in projects May 12, 2017
@2e2a
Copy link
Contributor

2e2a commented May 24, 2017

This image size is limited by our web server to 10M. Is this not enough?

@xi
Copy link
Contributor

xi commented May 24, 2017

I think part of the issue is that the error page does not look particularly nice. I think it is an important security property that large file uploads are blocked before they even reach django. Still, it is not an ideal user experience.

Maybe we can have a compromise: Increase the maximum in nginx, so we can show nicer error pages for medium-large files. Huge files could still be blocked early.

@2e2a
Copy link
Contributor

2e2a commented May 24, 2017

The current limit in django is 5M, in the webserver 10M.

Whereas we could increase the webserver limit, the disadvantage is that the image has to be fully uploaded before the django error is shown. The webserver error is shown directly.

@2e2a
Copy link
Contributor

2e2a commented Jun 16, 2017

@rukala Can we close this issue? Or should we change the limits?

@rittermo
Copy link

I would like to re-open this issue. I think we need to increase the nginx filesize limit and then think about (i.e. write a US) how we could validate the filesize documents to be uploaded via JS, no?

@rittermo rittermo reopened this Oct 12, 2017
@rmader
Copy link
Contributor

rmader commented Apr 17, 2018

I just set the nginx filesize limit to 20mb on all a4 instances. I'm rather reluctant to increase it further as that opens the door for DDOS things/makes it easier.

File size check seems to be easy, though, here is an example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug incorrect or uexpected behaviour
Projects
None yet
Development

No branches or pull requests

6 participants