-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Name the uploaded images different #387
Comments
I don't have any issues uploading files with the same name. Have you noticed this issue somehow? |
@jgrim its rather not good to have the images named like they do originally. Best it should be directly identifiable e.g. {uploader.id}-{random-hash}.png/jpg/webm
Edit: If lemmy has something different, pictrs just ignores the names and deduplicates it with image file hashes We dont know if they have it in any meta data but idk |
Pictrs doesn't store the actual image file itself, and nowhere on the filesystem or sled repo, is the uploaded file name. The identifier EG: e47-35c3e-95038ded-7a46-4d1a is in the pictrs Database to the filename/path in the Lemmy Database. pictrs uses sled for it's database. Lemmy code connects with it and translates as LEMMY needs, with it's requests/Database. In pictrs there is no such thing as a 'duplicate filename'. There is a concept of 'duplicate file or file pieces'.
|
Currently if a user uploads "A cute teddybear.jpg" it stays "A cute teddybear..." on the server this could lead to duplicates / errors if another "A cute teddybear" gets uploaded.
I would recommend to name them "{person.id}-{file.name}-{date}"
So it could be identified just by looking into the file name who uploaded it and when.
The text was updated successfully, but these errors were encountered: