Files
djdp/Ttalkkak/Program.cs

42 lines
1.1 KiB
C#
Raw Normal View History

2024-11-06 00:26:39 +09:00
using System;
using System.IO;
using System.IO.Compression;
using System.Net;
using System.Security.Cryptography;
using System.Threading.Tasks;
2024-11-08 14:44:52 +09:00
using CommunityToolkit.HighPerformance;
2024-11-06 00:26:39 +09:00
using K4os.Compression.LZ4.Streams;
using Minio;
using Minio.DataModel;
using Minio.DataModel.Args;
using Minio.DataModel.Encryption;
using Minio.Exceptions;
2024-11-08 14:44:52 +09:00
namespace Ttalkkak
2024-11-06 00:26:39 +09:00
{
2024-11-08 14:44:52 +09:00
static class Program
2024-11-06 00:26:39 +09:00
{
2024-11-08 14:44:52 +09:00
static async Task Main(string[] args)
2024-11-06 21:09:57 +09:00
{
2024-11-08 14:44:52 +09:00
IMinioClient client = new MinioClient()
.WithEndpoint("a4plane.duckdns.org", 8000)
.WithCredentials("1234", "12345678")
.WithSSL()
.Build();
try
2024-11-06 00:26:39 +09:00
{
2024-11-08 14:44:52 +09:00
var args2 = new GetObjectArgs()
.WithBucket("testob")
.WithObject("testo.txt")
.WithFile("testo.txt");
;
await client.GetObjectAsync(args2 );
2024-11-06 00:26:39 +09:00
}
2024-11-08 14:44:52 +09:00
catch (MinioException e)
2024-11-06 00:26:39 +09:00
{
2024-11-08 14:44:52 +09:00
Console.WriteLine(e);
throw;
2024-11-06 00:26:39 +09:00
}
}
}
2024-11-08 14:44:52 +09:00
}