szabodanika / microbin

A secure, configurable file-sharing and URL shortening web app written in Rust.
https://microbin.eu
BSD 3-Clause "New" or "Revised" License
2.51k stars 151 forks source link

Allow shorter pasta ID until a longer one is needed #257

Open swishkin opened 3 months ago

swishkin commented 3 months ago

Is your feature request related to a problem? Please describe.

Microbin is great and I really appreciate it, but for a URL shortener, it is a little lacking for small-scale use. If I'm basically the only one using the service, there will probably be no more than ten pastas out there at once. Having to type three animal names and the couple of hyphens is a little excessive in this scenario.

Describe the solution you'd like

Pasta ID should have the option to be limited to only the length that is necessary; in my case, it would be a single animal name to begin with, and if I ended up with more pastas than animal names, it could hyphenate the ID and add another.

Describe alternatives you've considered

ThankRain's custom URL branch has been working well for me, but my use case doesn't test it much. A custom URL option is a good workaround, but having the option for a auto-generated URL to be as short as possible, but allow for (almost) any number of pastas would be preferable.

Additional context

Possible variable name: MICROBIN_MINIMIZE_PASTA_ID or similar.

If I've been unclear of missed a relevant detail, I'm happy to respond. Thanks!