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

Problem Adding an Update Image greater than ~1MB #324

Closed
adriancollier opened this issue Sep 24, 2013 · 4 comments
Closed

Problem Adding an Update Image greater than ~1MB #324

adriancollier opened this issue Sep 24, 2013 · 4 comments

Comments

@adriancollier
Copy link
Contributor

When you try to upload an image to an Update where the image is larger than 1MB, you are provided with a bad error message:
screen shot 2013-09-24 at 15 34 28

If we have a fixed requirement for an image size below 1MB then this needs to be confirmed.

We advise Partners for less than 2MB, so we may need to change our messaging.

If a user tries to upload an image that is too big, we should validate this and present the user with the following message:

"The image you have chosen is too large. Please choose a smaller version or resize your image so that it is less than 2MB in size.

The best results are achieved with Images with an aspect ratio of 4:5."

carlio pushed a commit to akvo/akvo-provisioning that referenced this issue Sep 26, 2013
@carlio
Copy link
Contributor

carlio commented Sep 26, 2013

You can now upload larger files, however there is no easy way to give a nice error message. The server just stops the connection if more than 3mb is uploaded - it will never get to Django. In order for Django to understand enough to give a nice error message, we have to let all of the data through, which sort of makes the limit a moot point.

What's the largest image file size someone would reasonable expect to upload?

@carlio
Copy link
Contributor

carlio commented Sep 26, 2013

Note that we can replace the 413 page with a nice Akvo-styled 'oops that's too big', but it can only be a static HTML page and therefore the user would lose all of the other form information the submitted along with the big image.

@carlio
Copy link
Contributor

carlio commented Sep 26, 2013

I suggest that we have a Javascript check on the client which refuses to upload files which are too big, something like:
http://stackoverflow.com/questions/7497404/find-out-file-size-before-uploading-using-jquery-ajax/7497439#7497439

@adriancollier
Copy link
Contributor Author

To be covered in #219

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants