You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PutObjectAsync can upload files successfully without any errors, and the uploaded file can be seen in the web management page. However, after using PutObjectAsync to upload a file, this local file remains locked by Minio and cannot be deleted, even though the upload was successful a long time ago.
Below is the code I used for testing, and I can ensure that the endpoint, accessKey, secretKey are all correct, and the filePath file exists and is not being used by other programs.
` string filePath = $"files/1.tmp";
if (!File.Exists(filePath))
{
Console.WriteLine($"file does not exist! [{filePath}]");
return;
}
var client = new MinioClient()
.WithEndpoint(endpoint)
.WithTimeout((int)TimeSpan.FromSeconds(5).TotalMilliseconds)
.WithCredentials(accessKey, secretKey)
.Build();
await client.PutObjectAsync(new PutObjectArgs()
.WithBucket("xys-patent-file")
.WithObject($"temp/test/{Path.GetFileName(filePath)}")
.WithFileName(filePath));
Console.WriteLine("success!");
Thread.Sleep(TimeSpan.FromMinutes(1));
//System.IO.IOException:because it is being used by another process.
File.Delete(filePath);`
Oh! By the way, I'm using Minio version 5.0.0.
The text was updated successfully, but these errors were encountered:
I apologize for my poor English!
PutObjectAsync can upload files successfully without any errors, and the uploaded file can be seen in the web management page. However, after using PutObjectAsync to upload a file, this local file remains locked by Minio and cannot be deleted, even though the upload was successful a long time ago.
Below is the code I used for testing, and I can ensure that the endpoint, accessKey, secretKey are all correct, and the filePath file exists and is not being used by other programs.
` string filePath = $"files/1.tmp";
Oh! By the way, I'm using Minio version 5.0.0.
The text was updated successfully, but these errors were encountered: