uplink
uplink copied to clipboard
[Round 2] Handle copying object to the same location
One way to update metadata with S3 is doing server-side copy to the same location with new metadata. We should also support this case in uplink but we don't need to do full server-side copy operation but we can use UpdateObjectMetadata
on uplink side when we detect that the source location is equal to the destination location.
AC:
- extend CopyObject method to handle coping to the same location
- use UpdateObjectMetadata metainfo endpoint to set new metadata if source location and destination location are the same and new metadata was set
- add test cases
I just realized that we cannot use UpdateObjectMetadata
directly as CopyObject
needs to return object metadata. We have two solutions:
- adjust satellite to handle coping to the same location and return object metadata correctly
- just return error when user wants copy to the same location (we may do this initially and later go to first point)
We need to implement that on server side first https://github.com/storj/storj/issues/4604 After that we need to revisit if we need to do something for uplink too.