Skip to content

bhyvex/minio-dotnet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

153 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minio .NET Library for Amazon S3 Compatible Cloud Storage Gitter

Install from NuGet Build Status

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

PM> Install-Package Minio

Example

using Minio;

private static MinioClient client = new MinioClient("https://s3.amazonaws.com", "Access Key", "Secret Key");

var buckets = client.ListBuckets();
foreach (Bucket bucket in buckets)
{
    Console.Out.WriteLine(bucket.Name + " " + bucket.CreationDate);
}

Additional Examples

Bucket Operations

Object Operations

Pesigned Operations

How to run these examples?

On Linux (Ubuntu 14.04)

Simply edit the example .Net program to include your access credentials and follow the steps below.

NOTE: minio-dotnet requires mono 4.2 stable release to build on Linux.
$ git clone https://github.com/minio/minio-dotnet && cd minio-dotnet
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
$ echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
$ sudo apt-get update
$ sudo apt-get install mono-xbuild mono-complete
$ sudo mozroots --import --machine --sync 
$ sudo certmgr -ssl -m https://go.microsoft.com
$ sudo certmgr -ssl -m https://nugetgallery.blob.core.windows.net
$ sudo certmgr -ssl -m https://nuget.org
$ wget https://www.nuget.org/nuget.exe
$ mono nuget.exe update -self
$ mono nuget.exe restore
$ xbuild /t:Clean
$ xbuild /t:Rebuild /p:Configuration=Release

[ Add your s3 credentials in `Minio.Examples/app.config` file
N B - In case you send PRs to `minio-dotnet` remember to remove your s3 credentials from the above file.
Alternately, you could execute the following command once in your local repo to inform git to stop tracking
changes to App.config.
	`git update-index --assume-unchanged Minio.Examples/App.config`
]

$ mcs /r:System.Configuration /r:Minio/bin/Release/Minio.dll Minio.Examples/ListBuckets.cs
$ export MONO_PATH=Minio/bin/Release
$ mono Minio.Examples/ListBuckets.exe
....

On Windows

  • Add your s3 credentials in Minio.Examples/app.config file N B - In case you send PRs to minio-dotnet remember to remove your s3 credentials from the above file. Alternately, you could execute the following command once in your local repo to inform git to stop tracking changes to App.config. git update-index --assume-unchanged Minio.Examples/App.config

  • Build Minio solution

  • Move into Minio.Examples directory

  • Run the following cmd script runsample <ExampleFilename>

Contribute

Contributors Guide

About

Minio .NET Library for Amazon S3 Compatible Cloud Storage

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • C# 99.1%
  • Other 0.9%