Closed DaiYuanchuan closed 6 months ago
Use the same object as source and destination object in copyObject()
Use the same object as source and destination object in
copyObject()
It is also affected by the size of the file, with this object being 23.7GB(xx.2024.HDR.2160P.120FPS.mp4) and taking 6000ms, while the other object at 1.7GB took only 300ms.
Map<String, String> headers = Maps.newHashMapWithExpectedSize(5);
headers.put("Content-Type", "video/mp4");
ObjectWriteResponse future = minioClient.copyObject(
CopyObjectArgs. builder()
.bucket(BUCKET_NAME)
.object("xx.2024.HDR.2160P.120FPS.mp4")
.source(
CopySource. builder()
.bucket(BUCKET_NAME)
.object("xx.2024.HDR.2160P.120FPS.mp4")
.build())
.metadataDirective(Directive.REPLACE)
.userMetadata(headers)
.build());
Raise an issue with the server you are using.
I want to modify the ContentType value of an object after the upload operation is completed.
I know that I can modify it when using CopyObject, but I only want to modify the ContentType value, not copy the entire object. If the object is very large, it would actually result in a copying operation, which would be very time-consuming.