42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.IO.Compression;
|
|
using System.Net;
|
|
using System.Security.Cryptography;
|
|
using System.Threading.Tasks;
|
|
using CommunityToolkit.HighPerformance;
|
|
using K4os.Compression.LZ4.Streams;
|
|
using Minio;
|
|
using Minio.DataModel;
|
|
using Minio.DataModel.Args;
|
|
using Minio.DataModel.Encryption;
|
|
using Minio.Exceptions;
|
|
|
|
namespace Ttalkkak
|
|
{
|
|
static class Program
|
|
{
|
|
static async Task Main(string[] args)
|
|
{
|
|
IMinioClient client = new MinioClient()
|
|
.WithEndpoint("a4plane.duckdns.org", 8000)
|
|
.WithCredentials("1234", "12345678")
|
|
.WithSSL()
|
|
.Build();
|
|
try
|
|
{
|
|
var args2 = new GetObjectArgs()
|
|
.WithBucket("testob")
|
|
.WithObject("testo.txt")
|
|
.WithFile("testo.txt");
|
|
;
|
|
await client.GetObjectAsync(args2 );
|
|
}
|
|
catch (MinioException e)
|
|
{
|
|
Console.WriteLine(e);
|
|
throw;
|
|
}
|
|
}
|
|
}
|
|
} |