If the image verifies, and is on your server already, why not resize it? :D
On Thu, Jul 3, 2008 at 11:49 PM, Berco Beute <[EMAIL PROTECTED]> wrote:
>
> To answer my own question, I now moved the validation code to the form
> and create a PIL image using
> Image.open(StringIO(uploadedFile.content))
To answer my own question, I now moved the validation code to the form
and create a PIL image using
Image.open(StringIO(uploadedFile.content)):
===forms.py
class ImageForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(ImageForm, self).__init__(*args, **kwargs)
de
Something tells me the validation actually belongs to the form, but
how can I get to the image size from within the form?
===forms.py
class ImageForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(ImageForm, self).__init__(*args, **kwargs)
def clean_image(self):
3 matches
Mail list logo