andrii-kryvoviaz / slink

Self-hosted image sharing service.
MIT License
217 stars 4 forks source link

[Feature Request] URL alias and\or URL Shortener integration #19

Open maksii opened 4 months ago

maksii commented 4 months ago

The default image URL looks like domain.com/info/95f42d18-5ce2-4de1-ae53-0aee4e0f815f

I suggest integrating with one of the existing URL Shortener services(sefl-hosted, ofс) to provide better-looking short links. Because of the similarity in names, the first thing that comes to my mind https://github.com/shlinkio/shlink

Expected changes:

  1. Integration module with shlink
  2. The Docker configuration is extended with an option to specify the shortener API endpoint and secret.
  3. Image upload extended with checkbox to generate short url
  4. Details View extended with the second textbox with a shorter URL and refresh button(in case the user decides to ignore the flag during creation or wants to use it for historical records)

Alternativly\Additionaly would be nice to be at least able to specify an alias for existing URLs, e.g., changing the description, but for the URL. domain.com/info/95f42d18-5ce2-4de1-ae53-0aee4e0f815f to be able to change into domain.com/info/my-image

andrii-kryvoviaz commented 4 months ago

That what could be definitely added down the road. Note, that as of now only plain images could be shared, and user, who don't own the "upload" will see 403 trying to access image info page. Actually, there is a feature request #7, which has to be introduced prior to this change.