Shorter urls without md5

enricodias4654

Member
YetiShare User
Jan 13, 2015
411
1
16
Hello.

Currently the scripts uses the md5 function to get a random string of 16 hexadecimal characters and uses it in file urls. Since this string is saved as char in the db we can use a random string using characters a-Z and 0-9.

With random strings of 12 characters we would have a shorter url and save less data in the db. Those 12 characters can hold more ids than 16 characters in hex. This change can be implemented without breaking old urls.

12 characters is a bit overkill. Most sites will be fine with sizes between 8 and 10.