var client = new MinStorageClient("min://{host}/{root}={psw}/{buket}");
var prefix = 12;
// upload
await client.Upload("images", $"{prefix}-demo.bmp", File.OpenRead("demo.bmp"), "image/bmp");
// list
var list = client.Search("images", $"{prefix}");
foreach (var item in list)
{
Console.WriteLine(item);
}
// download
var stream = await client.Download("images", $"{prefix}-demo.bmp");
var data = new byte[stream.Length];
await stream.WriteAsync(data, 0, data.Length);
await File.WriteAllBytesAsync($"{Guid.NewGuid()}.bmp", data);
// delete
await client.Delete("images", $"{prefix}-demo.bmp");
-
Notifications
You must be signed in to change notification settings - Fork 0
UzEx Storage MinIO client
uzbekdev1/UzEx.Storage.MinIO
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
UzEx Storage MinIO client