Open jaqb8 opened 2 months ago
Can confirm this is an issue. We currently have a unique constraint on appId + customId, and deleted file records (just db row, not files) are retained for a period after deletion, which can cause conflict.
Perhaps we can add status into the unique constraint to avoid this cc @juliusmarminge
@markflorkowski adding status to the unique constraint sounds like a race condition disaster waiting to happen. Ideally we'd either ignore deleted assets or change their ids once deleted to prevent the clash
Provide environment information
Describe the bug
I set
customId
of a file to one of my entities id (cuid
) in middleware.This only works once - even if I remove the image with the
customId
from storage and then try to upload a new file with the samecustomId
, the following error appears.Link to reproduction
n/a
To reproduce
customId
in storage.customId
.Additional information
No response
๐จโ๐งโ๐ฆ Contributing
Code of Conduct