ente icon indicating copy to clipboard operation
ente copied to clipboard

Correct the order for creating s3 presigned objects

Open blmhemu opened this issue 1 year ago • 0 comments

Note: I am still finding my way through the codebase. If this PR seems illogical LMK.

Description

In the current scenario, we first create a s3 object, presign it and then insert into the DB. If this fails just before inserting into the db, we have a dangling object we don't cleanup.

But if we first insert it in DB, then it should work fine as background cleaner will be able to find it always.

Maybe this is needed for multipart uploads as well, but it may not be trivial to fix that.

Tests

blmhemu avatar Mar 09 '24 18:03 blmhemu