All Projects → minio → Minio Dotnet

minio / Minio Dotnet

Licence: apache-2.0
MinIO Client SDK for .NET

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Minio Dotnet

Storage
💿 Storage abstractions with implementations for .NET/.NET Standard
Stars: ✭ 380 (+52.61%)
Mutual labels:  aws-s3, dotnet-core
Php Ffmpeg Video Streaming
📼 Package media content for online streaming(DASH and HLS) using FFmpeg
Stars: ✭ 246 (-1.2%)
Mutual labels:  aws-s3
Perfview
PerfView is a CPU and memory performance-analysis tool
Stars: ✭ 2,924 (+1074.3%)
Mutual labels:  dotnet-core
Templates
.NET project templates with batteries included, providing the minimum amount of code required to get you going faster.
Stars: ✭ 2,864 (+1050.2%)
Mutual labels:  dotnet-core
Electron.net Api Demos
Explore the Electron.NET APIs
Stars: ✭ 231 (-7.23%)
Mutual labels:  dotnet-core
Clean Architecture Manga
🌀 Clean Architecture with .NET6, C#10 and React+Redux. Use cases as central organizing structure, completely testable, decoupled from frameworks
Stars: ✭ 3,104 (+1146.59%)
Mutual labels:  dotnet-core
Aws S3 Proxy
Reverse proxy for AWS S3 with basic authentication.
Stars: ✭ 227 (-8.84%)
Mutual labels:  aws-s3
Sharpsnmplib
Sharp SNMP Library- Open Source SNMP for .NET and Mono
Stars: ✭ 247 (-0.8%)
Mutual labels:  dotnet-core
Dapper.graphql
A .NET Core library designed to integrate the Dapper and graphql-dotnet projects with ease-of-use in mind and performance as the primary concern.
Stars: ✭ 244 (-2.01%)
Mutual labels:  dotnet-core
Node S3 Uploader
Flexible and efficient resize, rename, and upload images to Amazon S3 disk storage. Uses the official AWS Node SDK for transfer, and ImageMagick for image processing. Support for multiple image versions targets.
Stars: ✭ 237 (-4.82%)
Mutual labels:  aws-s3
Mond
A scripting language for .NET Core
Stars: ✭ 237 (-4.82%)
Mutual labels:  dotnet-core
Punchclock
Make sure your asynchronous operations show up to work on time
Stars: ✭ 235 (-5.62%)
Mutual labels:  dotnet-core
Mongo2go
Mongo2Go - MongoDB for integration tests (.NET Core)
Stars: ✭ 240 (-3.61%)
Mutual labels:  dotnet-core
Designpatterns
Simple repository containing one simple example for all existing patterns in C#
Stars: ✭ 231 (-7.23%)
Mutual labels:  dotnet-core
Fsharp Companies
Community curated list of companies that use F#
Stars: ✭ 246 (-1.2%)
Mutual labels:  dotnet-core
Cppast.net
CppAst is a .NET library providing a C/C++ parser for header files powered by Clang/libclang with access to the full AST, comments and macros
Stars: ✭ 228 (-8.43%)
Mutual labels:  dotnet-core
Emacs Easy Hugo
Emacs major mode for managing hugo
Stars: ✭ 235 (-5.62%)
Mutual labels:  aws-s3
Winton.extensions.configuration.consul
Enables Consul to be used as a configuration source in dotnet core applications
Stars: ✭ 239 (-4.02%)
Mutual labels:  dotnet-core
Moonglade
The .NET 5 blog system of https://edi.wang, runs on Microsoft Azure
Stars: ✭ 249 (+0%)
Mutual labels:  dotnet-core
Netcorekit
💗 A crafted toolkit for building cloud-native apps on the .NET platform
Stars: ✭ 248 (-0.4%)
Mutual labels:  dotnet-core

MinIO Client SDK for .NET Slack Build status

MinIO Client SDK provides higher level APIs for MinIO and Amazon S3 compatible cloud storage services.For a complete list of APIs and examples, please take a look at the Dotnet Client API Reference.This document assumes that you have a working VisualStudio development environment.

Minimum Requirements

  • .NET 4.5.2, .NetStandard 2.0 or higher
  • Visual Studio 2017

Install from NuGet

To install MinIO .NET package, run the following command in Nuget Package Manager Console.

PM> Install-Package Minio

MinIO Client Example

To connect to an Amazon S3 compatible cloud storage service, you will need to specify the following parameters.

Parameter Description
endpoint URL to object storage service.
accessKey Access key is the user ID that uniquely identifies your account.
secretKey Secret key is the password to your account.
secure Enable/Disable HTTPS support.

The following examples uses a freely hosted public MinIO service 'play.min.io' for development purposes.

using Minio;

// Initialize the client with access credentials.
private static MinioClient minio = new MinioClient("play.min.io",
                "Q3AM3UQ867SPQQA43P2F",
                "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"
                ).WithSSL();

// Create an async task for listing buckets.
var getListBucketsTask = minio.ListBucketsAsync();

// Iterate over the list of buckets.
foreach (Bucket bucket in getListBucketsTask.Result.Buckets)
{
    Console.WriteLine(bucket.Name + " " + bucket.CreationDateDateTime);
}

Complete File Uploader Example

This example program connects to an object storage server, creates a bucket and uploads a file to the bucket. To run the following example, click on [Link] and start the project

using System;
using Minio;
using Minio.Exceptions;
using Minio.DataModel;
using System.Threading.Tasks;

namespace FileUploader
{
    class FileUpload
    {
        static void Main(string[] args)
        {
            var endpoint  = "play.min.io";
            var accessKey = "Q3AM3UQ867SPQQA43P2F";
            var secretKey = "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG";
            try
            {
                var minio = new MinioClient(endpoint, accessKey, secretKey).WithSSL();
                FileUpload.Run(minio).Wait();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            Console.ReadLine();
        }

        // File uploader task.
        private async static Task Run(MinioClient minio)
        {
            var bucketName = "mymusic";
            var location   = "us-east-1";
            var objectName = "golden-oldies.zip";
            var filePath = "C:\\Users\\username\\Downloads\\golden_oldies.mp3";
            var contentType = "application/zip";

            try
            {
                // Make a bucket on the server, if not already present.
                bool found = await minio.BucketExistsAsync(bucketName);
                if (!found)
                {
                    await minio.MakeBucketAsync(bucketName, location);
                }
                // Upload a file to bucket.
                await minio.PutObjectAsync(bucketName, objectName, filePath, contentType);
                Console.WriteLine("Successfully uploaded " + objectName );
            }
            catch (MinioException e)
            {
                Console.WriteLine("File Upload Error: {0}", e.Message);
            }
        }
    }
}

Running MinIO Client Examples

On Windows

  • Clone this repository and open the Minio.Sln in Visual Studio 2017.

  • Enter your credentials and bucket name, object name etc.in Minio.Examples/Program.cs Uncomment the example test cases such as below in Program.cs to run an example.

  //Cases.MakeBucket.Run(minioClient, bucketName).Wait();
  • Run the Minio.Client.Examples project from Visual Studio

On Linux (Ubuntu 16.04)

Setting up Mono and .NETCore on Linux
NOTE: minio-dotnet requires mono 5.0.1 stable release and .NET Core 2.0 SDK to build on Linux.
$ ./mono_install.sh
Running Minio.Examples
  • Clone this project.
$ git clone https://github.com/minio/minio-dotnet && cd minio-dotnet
  • Enter your credentials and bucket name, object name etc. in Minio.Examples/Program.cs Uncomment the example test cases such as below in Program.cs to run an example.
  //Cases.MakeBucket.Run(minioClient, bucketName).Wait();
$ cd Minio.Examples
$ dotnet build -c Release
$ dotnet run

Bucket Operations

Bucket policy Operations

Bucket notification Operations

File Object Operations

Object Operations

Presigned Operations

Client Custom Settings

Explore Further

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].