Skip to content

CoreComponents/MinioHelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CoreComponents Minio Helper

This package is an extension to Minio.

This package contains simplified methods for upload and download objects from minio buckets.

Usage

For download object

var minioEndpoint = "";
var accessKey = "";
var secretKey = "";

IMinioClient minio = new MinioClient()
   .WithEndpoint(minioEndpoint)
   .WithCredentials(accessKey, secretKey)
   .WithSSL(true)
   .Build();

var bucketName = "";
var objectPath = "";
var resultStream = await minio.GetObjectStreamAsync(bucketName, objectPath);

For Upload object

var minioEndpoint = "";
var accessKey = "";
var secretKey = "";

IMinioClient minio = new MinioClient()
   .WithEndpoint(minioEndpoint)
   .WithCredentials(accessKey, secretKey)
   .WithSSL(true)
   .Build();

var filePath = "";
FileStream fsSource = new FileStream(filePath, FileMode.Open, FileAccess.Read);

var bucketName = "";
var objectPath = "";

var resultStream = await minio.GetObjectStreamAsync(bucketName, objectPath);
await minio.UploadObjectAsync(fsSource, bucketName, objectPath);

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages