Open fauno opened 3 years ago
I ran into a similar problem last summer: https://github.com/mul53/activestorage-ipfs/issues/6
I ran into a similar problem last summer: #6
Thanks! I saw it but this one happens after that, when the Attachment gets the existing Blob and just before discarding the new one
Hi, I'm very interested in using this gem and probably send patches. So far I've found this:
Attaching a file twice throws a constraint error:
Should
IpfsService
catch duplicateAttachment
s and remove them? Also getting the lastAttachment
without a query feels weird, wouldn't it be better to change it to something likeAttachment.find_by(blob: new_blob)
?I'll prepare a PR after discussing, thanks!