Sometimes you want to have one physical file which is referred to by multiple entities, for example you do a mass mailing with an attachment and have many email message entities which share the same attachment
You would want them to attach via filestore with individual tokens, but with the same location field, so you do not have to store the attachment file e.g. 1000 times.
Issue today: If one of those mass emails is deleted, filestore would delete the physical file location where then all other emails lose their file as well
Proposed solution:
filestore will only delete the physical file, if there is no other entity in file model which refers to the same location. Otherwise the file will not be deleted.
Please share your thoughts, I could then submit a PR implementing this.
Situation:
location
field, so you do not have to store the attachment file e.g. 1000 times.location
where then all other emails lose their file as wellProposed solution:
file
model which refers to the same location. Otherwise the file will not be deleted.Please share your thoughts, I could then submit a PR implementing this.