Metron-Project / metron

Django website for a comic book database
https://metron.cloud/
GNU General Public License v3.0
90 stars 7 forks source link

Profile image update doesn't work #55

Closed bpepple closed 3 years ago

bpepple commented 3 years ago

Describe the bug When editing a user profile and the users profile image is uploaded

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Edit Profile'
  2. Click on 'Choose a File...'
  3. Click and 'Submit' button

Expected behavior The user image is added to profile

Additional info Form contains a file input, but is missing method=POST and enctype=multipart/form-data on the form.

Solution Adding <form method="post" enctype="multipart/form-data">to the change_profile.html template should fix this.

bpepple commented 3 years ago

In addition, it looks like either the view or form needs to be fixed also so the image field is saved.