Supabase Storage: 409 Asset Already Exists during re-upload
The second upload of a file under the identical path returns the conflict instead of overwriting. The default file creation operation behavior may not allow the existing object to be overwritten.
How to determine the source of the error
Save the exact name of the bucket and the path of the object, not the local file itself.
Check whether the re-send is deliberate and if the user has the right rights to INSERT and UPDATE.
What to do step by step
1. If files are to be uploaded, create unique safe paths and save a reference to the current version.
2 . If overwriting is a requirement, use consciously upsert with appropriate policies and collision control.
How to check the score
Multiple file uploads retain the established version policy and other client data is not overwritten.
What to do
Do not set upsert=true without checking the effects on existing attachments.