[Answer]-Image not saving to db edit profile django

1👍

Most likely you forgot to add enctype atrribute to <form> tag. It should be like this:

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

Another possible reason is initiating of form instance without request.FILES argument. Correct form creation is:

form = MyForm(request.POST, request.FILES)

Leave a comment