Re: ImageFiled Uploads

2008-07-17 Thread Dane Hesseldahl
Just FYI - I ended up using the models save__file method like this: if 'avatar' in request.FILES: uf = request.FILES['avatar'] os.remove(settings.MEDIA_ROOT + "/avatars/" + user.username + ".jpg") profile.save_profile_avatar_file("avatars/" + user.username + ".jpg", uf) On Wed, Jul

ImageFiled Uploads

2008-07-16 Thread Dane Hesseldahl
Hey guys, I can't seem to find a good resource for the best way to handle this, so I thought I'd ask. What is the best way to handle an upload through an ImageField in a custom form? For example: class ProfileForm(forms.Form): first_name = forms.CharField(label='First Name', required=