Open maugsburger opened 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!
@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.
Better to leave this to a filesystem IMO
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.