partkeepr / PartKeepr

Open Source Inventory Management
http://www.partkeepr.org
GNU General Public License v3.0
1.39k stars 402 forks source link

deduplicate attachements #141

Open maugsburger opened 12 years ago

maugsburger commented 12 years ago

All forms of attachements should be deduplicated, either automatically or by manually sharing them among multiple parts.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Drachenkaetzchen commented 12 years ago

The most simple approaches I've thought of are somewhat impractical. Let's say we have a attachment that is shared across parts: what happens if the manufacturer decides to publish separate datasheets? If you now update the attachment on one part, it would also be changed in the other part, which is probably not what you want.

If you have any idea how to solve that in a good way, I'm interested!

tiefpunkt commented 11 years ago

@silsha and I are facing a similar issue with mEintopf. One thought we had was to calculate the md5-hash (or similar) of every attachment, and use that hash as a filename in storage. Mapping between a "real" filename and the actual file in storage could be done on database level. When the same attachment gets uploaded again, the uploader notices that the file already exists (maybe by doing additional collision checks), and just creates a new link on database level.

baradhili commented 4 years ago

Better to leave this to a filesystem IMO