1

I'm using the django-contrib package django-profiles, and everything is working great - my only issue is that I would like the form to upload a file (for an avatar), unfortunately - the form does not upload the file.

Has anyone successfully managed to get file uploads working with django-profiles? I want to avoid having to set up a seperate upload view just for the avatar?

Any help is much appreciated!

Thanks, Martin

1 Answer 1

4

In your template add enctype="multipart/form-data" in form tag. Example:

<form method="post" action="." enctype="multipart/form-data">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.