codelitdev / courselit

Create/Sell courses and digital downloads and publish blogs on your own branded website. An open source alternative to Teachable, Thinkific, Podia and the likes.
https://courselit.app
GNU Affero General Public License v3.0
631 stars 135 forks source link

Photo upload to user's profile #405

Closed rajat1saxena closed 1 month ago

rajat1saxena commented 2 months ago

The user should be able to upload a photo of theirs to their profile.

The picture upload should be available in the Personal details form on /profile, after the Bio field.

Once uploaded, the photo should be also visible:

  1. in the /dashboard/users lobby against the user's entry. For users without profile pics, the default circular courselit backdrop should be visible (the same image we use for the favicon in the browser tab).

Image

  1. In the blog post, against user's name

Image

User model changes

The user model should have a property called avatar of type Media.

rajat1saxena commented 1 month ago

There was a bug in the fix. It did not let non-admin accounts upload the photos.

We have created #462 to simplify role-based access related to media.