minio-dotnet
minio-dotnet copied to clipboard
Uploads file > 5mb failed
Hi, when I upload: Small files work, >5mb fails. I run minio on docker and it's behind a nginx reverse proxy. I can upload big files using the web-ui the dotnet minio library however always fails if the file is bigger than 5 mb minio 4.6, net6
-- minio behind a nginx reverse proxy exception message: MinIO API responded with message=The specified key does not exist.
StackTrace:
at Minio.MinioClient.ParseErrorFromContent(ResponseResult response)
at Minio.MinioClient.ParseError(ResponseResult response)
at Minio.MinioClient.HandleIfErrorResponse(ResponseResult response, IEnumerable`1 handlers, DateTime startTime)
at Minio.MinioClient.<ExecuteTaskCoreAsync>d__181.MoveNext()
at Minio.MinioClient.<NewMultipartUploadAsync>d__83.MoveNext()
at Minio.MinioClient.<PutObjectAsync>d__63.MoveNext()
code:
IFormFile image...
var args = new PutObjectArgs()
.WithBucket(bucketName)
.WithObject(objectName)
.WithObjectSize(image.Length)
.WithContentType(image.ContentType)
.WithStreamData(image.OpenReadStream());
await minio.PutObjectAsync(args);
share your nginx configuration? @vuonghung12
@harshavardhana i'm using nginx proxy manager with config from https://min.io/docs/minio/linux/integrations/setup-nginx-proxy-with-minio.html
after some nginx config, I had move to another error InnerException: {" was not expected."} Message: "There is an error in XML document (1, 2)." StackTrace:
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream)
at Minio.NewMultipartUploadResponse..ctor(HttpStatusCode statusCode, String responseContent)
at Minio.MinioClient.<NewMultipartUploadAsync>d__83.MoveNext()
at Minio.MinioClient.<PutObjectAsync>d__63.MoveNext()
at Services.Helper.Common.<UploadFormFileToMinio>d__10.MoveNext() in
@vuonghung12 Can you connect directly to MinIo and bypass the nginx configuration?
@kannappanr I tried but not work, this have error like issue #716
@kannappanr I tried but not work, this have error like issue #716
@vuonghung12,
So, you are saying this issue became duplicate of #716 after making changes in your nginx configuration, right? If that is correct, please close this one as duplicate off #716 or vice versa.
@ebozduman this is my flow behind nginx: check bucket exist (OK) => upload (NG - #715) direct ip: check bucket exist (NG - #716 ) => upload (....)
here is the trace when I upload failed
I think it return "The specified key does not exist." because s3.GetObject return 404 while s3.ListMultipartUploads not finished yet
This is also happening to me on both a local minio deployment on dietpi and on a contabo S3 bucket that runs on Ceph. I switched to using the AWS nuget and it works fine on both.
@eldenis
Please confirm you used the latest (currently available) nuget in your scenario.
We've addressed quite a bunch of issues in the coming package. As soon as our tests are complete, there will be a new dotnet sdk release.
@ebozduman Yes, I am using the latest nuget.
Glad to hear a new package is coming out soon! Thanks!