Browse Source
Add RemoveIncompleteUploadsAsync operation to remove incomplete uploads from server
pull/129/head
Add RemoveIncompleteUploadsAsync operation to remove incomplete uploads from server
pull/129/head

8 changed files with 94 additions and 33 deletions
-
3Minio.Api/ApiEndpoints/CustomClientSettings.cs
-
2Minio.Api/ApiEndpoints/IObjectOperations.cs
-
36Minio.Api/ApiEndpoints/ObjectOperations.cs
-
28Minio.Api/MinioRestClient.cs
-
31Minio.Examples/Cases/RemoveIncompleteUpload.cs
-
1Minio.Examples/Minio.Examples.csproj
-
20Minio.Examples/Program.cs
-
6README.md
@ -0,0 +1,31 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Minio.Examples.Cases |
|||
{ |
|||
class RemoveIncompleteUpload |
|||
{ |
|||
|
|||
//Remove incomplete upload object from a bucket
|
|||
public async static Task Run(MinioRestClient minio) |
|||
{ |
|||
try |
|||
{ |
|||
var bucketName = "bucket-name"; |
|||
var bucketObject = "bucket-object"; |
|||
|
|||
bucketName = "mountshasta"; |
|||
bucketObject = "newmulti-225"; |
|||
await minio.Objects.RemoveIncompleteUploadAsync(bucketName, bucketObject); |
|||
Console.Out.WriteLine("object-name removed from bucket-name successfully"); |
|||
} |
|||
catch (Exception e) |
|||
{ |
|||
Console.WriteLine("[Bucket-Object] Exception: {0}", e); |
|||
} |
|||
} |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue