frlan / partuniverse

Another approach to keep track of parts inside a hacker space or more general storage.
Other
11 stars 7 forks source link

Prevent duplicated upload of images #148

Open frlan opened 8 years ago

frlan commented 8 years ago

When using the same pic again and again via the upload button its also storing the large with a different name inside media-folder. Having many items with the same symbolic picture — resistor e.g. — this is waste of hard disc.

enko commented 8 years ago

Maybe we can do something I did with picdump. I generate a hash (IIRC ripemd 160) of the content und use that to save the filename. So if you upload the some content again and again no harddisc will be wasted. Of course you would need to do reference counting and when its not used any more, delete it.

frlan commented 8 years ago

This is a good idea but would need to change the middleware doing upload. Should be doable.

egon0 commented 7 years ago

Maybe a simple modal with one tab to upload a new pic and another tab that shows paginated thumbnails of existing images is a more easy to implement solution.