Closed ppazos closed 4 years ago
Delete should not move he file but empty trash should, because if the file is moved and the OPTs get reindexed, the OPT index in the DB will be deleted, thus, the deleted OPT won't appear in the trash.
The key is being set but it is not stored in S3 with the new name...
s3Object.setKey(opt.fileLocation + '.deleted')
That is in OptS3Service.emptyTrash()
The only way to rename an object is to copy the old object to a new object, and set the new name on the new copy.
Also check copy operation: https://stackoverflow.com/questions/32646646/how-do-i-update-metadata-for-an-existing-amazon-s3-file
The issue was solved by copying then delete the old object.
Done.
Describe the bug
This should be fixed after the S3 branch is merged.