Wingysam / Christmas-Community

Christmas lists for families
GNU Affero General Public License v3.0
287 stars 44 forks source link

Built in image upload #90

Open Spillebulle opened 1 year ago

Spillebulle commented 1 year ago

Often when I want to add something to the list, it is something I see in a store. Then it would be much easier to directly upload to the site, instead of first uploading to something like imgur, then paste the link from there.

Especially not easy for other family members

Wingysam commented 1 year ago

Image uploads would be ideal, but it introduces a lot of complexity. Should this app also be an image hosting service?

Wingysam commented 1 year ago

I've decided that yes, Christmas Community should also be an image hosting service. It increases complexity but the benefit is worth it here.

Tanush-J commented 1 year ago

But what service to use for storing image

Wingysam commented 1 year ago

We can store the files in a directory and serve them when requested. There's no need for s3 or anything since an instance won't have thousands of users.

servebeer commented 1 month ago

upvote

I am currently getting around this issue by mapping “ /usr/src/app/src/static/img” to a local persistent store at “ /mnt/user/appdata/christmas_community/img”. This requires each user to manually upload their image file and then. manually enter the path to the file. It’s a kludge, but it works. I have noticed that the Christmas Community icon in the upper left corner of the screen his now a “?”. I have not figured out how to fix this (if possible).

Wingysam commented 1 month ago

You could avoid that by copying src/static/img from this repo into your /mnt/user/appdata/christmas_community/img, but that is a hack and may break in future versions, like if the image files are changed or moved to another directory.