minio / minio-dotnet

MinIO Client SDK for .NET
https://docs.min.io/docs/dotnet-client-quickstart-guide.html
Apache License 2.0
577 stars 230 forks source link

copy deeply error CopyObjectAsync #1144

Closed dumeiwen closed 4 months ago

dumeiwen commented 4 months ago

NOTE

When I use the API CopyObjectAsync,There is no problem copying first-level folders, but errors will be reported if you copy deeply。I'm sure the file already exists,but get this error: MinIO API responded with message=Unsupported signed header: (content-disposition: attachment; filename="xxx"

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

var conditions = new CopyConditions();
conditions.SetModified(new DateTime(2017, 8, 18));
var copySourceObjectArgs = new CopySourceObjectArgs()
.WithBucket("test").WithObject("aaa/bbb/ccc/myfile.txt").WithCopyConditions(conditions);
var copyObjectArgs = new CopyObjectArgs()
.WithCopyObjectSource(copySourceObjectArgs)
.WithBucket("test")
.WithObject("aaa/bbb/ccc/myfile.txt");

await minio.CopyObjectAsync(copyObjectArgs).ConfigureAwait(false);

Context

Regression

Your Environment

jiuker commented 4 months ago

please share your simply code to let us to reproduce it quickly

dumeiwen commented 4 months ago

var conditions = new CopyConditions(); conditions.SetModified(new DateTime(2017, 8, 18)); var copySourceObjectArgs = new CopySourceObjectArgs() .WithBucket("test").WithObject("aaa/bbb/ccc/myfile.txt").WithCopyConditions(conditions); var copyObjectArgs = new CopyObjectArgs() .WithCopyObjectSource(copySourceObjectArgs) .WithBucket("test") .WithObject("aaa/bbb/ccc/myfile.txt");

await minio.CopyObjectAsync(copyObjectArgs).ConfigureAwait(false);

dumeiwen commented 4 months ago

please share your simply code to let us to reproduce it quickly

Am I using it incorrectly?

jiuker commented 4 months ago

please share your simply code to let us to reproduce it quickly

Am I using it incorrectly?

I am not good at dotnet

dumeiwen commented 4 months ago

I found that my source file contained this metadata(content-disposition), so the copy failed. It was not because the folder was too deep. The source file was written by a third party, so I didn't find this reason. Using WithReplaceMetadataDirective(true) can solve this problem.