Peter Bengtsson wrote:
> Sadly this means that if a user tries to upload a 11Mb file you won't
> be able to confront them with a user-friendly "error" message.
>
It's pretty straightforward to subclass django.forms.fields.FileField to
apply a size limit in clean(), or perhaps just do the check
One way of doing it, and to be honest the only one I know, is to set a
limit in the fronting web server.
In Nginx for example you add:
client_max_body_size 10M;
Sadly this means that if a user tries to upload a 11Mb file you won't
be able to confront them with a user-friendly "error" message.
Hi,
I'm using the admin interface with some filefield, I tested with a big
file (200 MB) and it was successfully uploaded, this is ok but I would
like a way to limiting the uploaded size for example to a maximun of
10 MB, any hints?
thanks
drakkan
--~--~-~--~~~---~--~
3 matches
Mail list logo