Closed philkunz closed 3 months ago
Please share more details @philkunz ?. Is there a bug/error or missing implementation?
yes, custom metadata is not supported, as shown in the linked issue. e.g. specifying x-amz-* key value pairs, is not supported in the copyObject method.
Please share code /trace
There is like a super weird mixture of js and TypeScript files in src. What is the reason for that setup?
But here you go:
There is no metadata to be specified.
compare the putObject method in comparison, where metadata can be specified:
as you can see the typescript migration is in progress.. some APIs/methods are yet to be migrated . There is copyObjectV2
(yet same interface with different arguments) could you please double check if it is used and required parameters are passed in your application/client code ?.
Please take a look at https://github.com/minio/minio-js/pull/1151
as you can see the typescript migration is in progress.. some APIs/methods are yet to be migrated . There is
copyObjectV2
(yet same interface with different arguments) could you please double check if it is used and required parameters are passed in your application/client code ?.
Hi @prakashsvmx
I’m currently facing an issue in my project where I am using version 8.0.0. I noticed that the copyObjectV2 method is not available in this version. However, I found that this method exists in the master branch. Could you please let me know when this method will be available in an official release?
@GarryRocksman
const result = await s3Client.copyObject(
new CopySourceOptions({
Bucket: bucketName,
Object: objectName,
}),
new CopyDestinationOptions({
Bucket: 'test-1-bucket',
Object: objectName,
MetadataDirective: 'REPLACE',
UserMetadata: {
'X-Amz-Height': '1300', //override this on the copy in target
},
}),
)
This would work in both old and new version
@prakashsvmx i tried this but have got - Expected 4-5 arguments, but got 2.
Typescript migration is in progress. Until then you can please wait for release.
@philkunz
Maybe it will help someone who faces the same problem using TypeScript. If you add // @ts-ignore, this approach will work as @prakashsvmx said before
const result = await s3Client.copyObject(
new CopySourceOptions({
Bucket: bucketName,
Object: objectName,
}),
new CopyDestinationOptions({
Bucket: 'test-1-bucket',
Object: objectName,
MetadataDirective: 'REPLACE',
UserMetadata: {
'X-Amz-Height': '1300', //override this on the copy in target
},
}),
)
The copyObject method is still not supporting metadata. There is a old issue, that somehow got moved to python: https://github.com/minio/minio-py/issues/1192