andrii-kryvoviaz / slink

Self-hosted image sharing service.
GNU Affero General Public License v3.0
313 stars 9 forks source link

[ Feature Request ] Add option for password protected image files #7

Open arpanghosh8453 opened 8 months ago

arpanghosh8453 commented 8 months ago

I am not sure if this is something you want to implement, but it might be useful to have a added password protection layer on the shared link. This is not an essential feature, but a nice to have one :)

andrii-kryvoviaz commented 8 months ago

Sounds interesting. Do you mean that the image itself should be protected? Currently, all the images are accesable by a link, whereas the app routes are protected with auth.

arpanghosh8453 commented 8 months ago

Yup, so when I share the access link, instead of showing the image, they will be presented with a password box, where if they enter the right password ( added when uploading the file by the user uploaded it ), they get to see the image.

This can be done in two ways 👍 generate a simple redirection link like image.domain.com/link/random-text-here, which will hide the actual generated link. upon entering the password, the user will be redirected to the actual viewable link. This is not ideal as the user will have the raw link after they enter the password once. But this is a good start.

The actual way is to implement the API backend, which will not allow access to the generated URL until a valid password is entered. But that's more difficult to implement.