Closed edgao closed 5 years ago
Obvious way to handle URL-shortening would be to have a flat file that maps SHA1 to filenames, but that sounds like a terrible idea.
Possible idea: When uploading a file, also create a short-name directory (random 5-characters); inside that directory store the hash of the file?
Thanks for doing this, but I'm not sure we should include this change. It makes the share URL a little longer, and I'm not sure it provides much benefit over the current system. It looks like it also computes the SHA1 after the upload is complete, so it will make it take longer.
…ndomly generated 5-character directory. (tmp directory still uses random directory name)
11 Progress on this - now really sure what the best way to shorten URLs is. This commit is mostly meant to be a starting point for that.