On Wednesday, 17 September 2008 23:35:46 [EMAIL PROTECTED] wrote:
> Better to set the upload filesize limit on your server eg Apache's has
> a directive for max file size. Otherwise the file will be uploaded and
> checked anyway.
I will look into this, but not sure how Apache will respond on the 
browser-end. Will it be a 500 page error of some kind?

The thing is, I don't mind that the file goes to the server and then gets 
rejected -- I want to avoid the drive filling with huge images, hence my code 
needs to return an error to the form saying "Sorry that was too big"

> If you want to report an error to the user you could use validation on
> the form. The code below returns a error if a file extension is not
> allowed.
This is fine when one is in a class using forms. But I am in a different class 
and I'm not sure of its relation to forms.ImageField -- what I need to do is 
raise an error in my FileSystemStorage class that can be caught and displayed 
in my forms.ImageField class.

Thanks for your input!
\d

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to