jchorl / sendfiles

82 stars 14 forks source link

Shorter URLs #4

Closed hrumhurum closed 10 months ago

hrumhurum commented 1 year ago

The current URL generation scheme produces something like this:

https://sendfiles.dev/receive/f328d915-8283-4ed7-b630-891a420f793e

which is good but not short enough for a manual entrance. A GUID has 128 bits of information which is plenty. Choosing a different encoding scheme like Base-58 would allow to produce a shorter string like:

https://sendfiles.dev/receive/2Np4FehkYW

The problem I'm trying to solve is a file exchange between two machines. The only reliable instrument of communication between them is my hands and filling GUIDs manually is no fun.

A shorter URL like

https://sendfiles.dev/r/2Np4FehkYW

may be even more beneficial because it is so much easier to type in. Avoiding l, 1, I, O, o, 0, q, g symbols in a generated URL makes it even more convenient for a manual transmission (those are usual suspects of recognition mistakes).

jchorl commented 10 months ago

Should be solved by https://github.com/jchorl/sendfiles/pull/5

Note that I base64-encoded the uuids, and they're still not super short. If you have better suggestions for shareable random IDs with enough entropy, I'm open to it.