Duplicate files are duplicate
Hello,
currently each file is saved in it's own folder with UUID name. It's nice that this lets us preserve original filenames, but comes with the downside that a file that's uploaded repeatedly is also saved to disk each time it's uploaded.
Extreme example: https://pl.smuglo.li/notice/131965
It would be neat if files could be saved as their SHA256 hash like in GNU/Social and if GNU/Pleroma could just use the original filename as visible text in the generated link.
So instead of:
<a href="https://pl.smuglo.li/media/40225dfe-a31c-421e-bbc7-30eb4252851a/image.png">image.png</a>
It would be:
<a href="https://pl.smuglo.li/media/b2fcf3f651c9146f82a4c5f721e1407797e2f79b6a18a915e79f89557e5afc17.png">image.png</a>
That would save disk space and may even make posts load faster in examples like the one above, since the browser only has to download one image instead of a hundred.