zhemdml wjdtkdghk

This commit is contained in:
2024-11-06 21:09:57 +09:00
parent bb5f6d6cd6
commit 008365566e

View File

@@ -16,27 +16,35 @@ class Program
static async Task Main(string[] args)
{
//Console.WriteLine("Hello, World!");
//Uri uri = new Uri("https://a4plane.duckdns.org/minio/");
Uri url = new Uri("http://a4plane.duckdns.org/a4plane/djdp");
//Uri url = new Uri("https://github.com/netdata/netdata");
using (var httpClient = new HttpClient())
{
var content = await httpClient.GetStringAsync(url);
Console.Write(content);
};
// Minio 설정 (Minio 클라이언트 인스턴스 생성)
IWebProxy proxy = new WebProxy("https://a4plane.duckdns.org", 443);
IMinioClient minioClient = new MinioClient()
.WithEndpoint("a4plane.duckdns.org")
.WithCredentials("a4plane", "661434Ghkd")
.WithSSL()
.WithProxy(proxy)
.Build();
//IWebProxy proxy = new WebProxy("https://a4plane.duckdns.org/minio/", 443);
//IMinioClient minioClient = new MinioClient()
// .WithEndpoint(uri)
// .WithCredentials("a4plane", "661434Ghkd")
// .WithSSL()
// .WithProxy(proxy)
// .Build();
// 압축 및 업로드할 폴더 및 파일 경로 설정
string sourceFolder = "testo";
string bucketName = "testob";
string objectName = "testtt.lz4";
string outputLz4File = Path.Combine(Directory.GetCurrentDirectory(), objectName);
//// 압축 및 업로드할 폴더 및 파일 경로 설정
//string sourceFolder = "testo";
//string bucketName = "testob";
//string objectName = "testtt.lz4";
//string outputLz4File = Path.Combine(Directory.GetCurrentDirectory(), objectName);
// 폴더를 압축
CompressFolderWithProgress(sourceFolder, outputLz4File);
//// 폴더를 압축
//CompressFolderWithProgress(sourceFolder, outputLz4File);
// 압축한 파일을 Minio로 업로드
await UploadWithProgress((MinioClient)minioClient, bucketName, objectName, outputLz4File);
//// 압축한 파일을 Minio로 업로드
//await UploadWithProgress((MinioClient)minioClient, bucketName, objectName, outputLz4File);
}
static void CompressFolderWithProgress(string sourceFolder, string outputLz4File)
@@ -130,6 +138,7 @@ class Program
.WithBucket(bucketName)
.WithObject(objectName)
.WithFileName(filePath)
.WithContentType("application/octet-stream")
.WithServerSideEncryption(ssec)
.WithProgress(progress);