thedevs-network / kutt

Free Modern URL Shortener.
https://kutt.it
MIT License
8.49k stars 1.11k forks source link

Option to allow reuse of shortened links? #709

Open brandonsturgeon opened 1 year ago

brandonsturgeon commented 1 year ago

I know there exists a "reuse" option right now, but from what I understand it's not what I'm looking for.

My desire is to shorten links sent inside of Discord Embeds to save on character limits in the request body. I personally don't care about statistics or anything like that - I only care about keeping my total character count to a minimum.

Often times, the same links will be sent in my Discord messages (i.e. a link to a homepage, or a link to a specific user's profile) - and in those cases, I would rather it return the shortlink that already exists for those links instead of creating a new one.

My preference is to:

  1. Never expire these links (for historical reference)
  2. Create as few shortlinks as possible so I can use the shortest slug I can

Does this already exist and I've just missed it? Is this something the project would be open to supporting?

poeti8 commented 1 year ago

This is what "reuse" does for you though, unless I misunderstood something you said. Let's say you have shortened https://example.com/hi and Kutt returned kutt.it/f8Sq1G, if you again send https://example.com/hi while reuse is set to true, you'd get back kutt.it/f8Sq1G.