1
아마존 S3에 폴더를 만들어야합니다. 이제 해당 폴더를 zip 파일로 변환해야합니다. DotNetZip Liberary를 사용하여 .zip 파일로 변환했습니다. 여기에 내가 오류를 보여주는 코드를 실행하면 그아마존 S3에서 zip 폴더 만들기
http://dotnetzip.codeplex.com/wikipage?title=CS-Examples
public void ConvertToZip(string directoryToZip, string zipFileName)
{
try
{
using (client = DisposableAmazonClient())
{
var sourDir = new S3DirectoryInfo(client, bucket, directoryToZip);
var destDir = new S3DirectoryInfo(client, bucket, CCUrlHelper.BackupRootFolderPhysicalPath);
using (var zip = new ZipFile())
{
zip.AddDirectory(sourDir.FullName); // recurses subdirectories
zip.Save(Path.Combine(destDir.FullName, zipFileName));
}
}
logger.Fatal("Successfully converted to Zip.");
}
catch (Exception ex)
{
logger.Error("Error while converting to zip. Error : " + ex.Message);
}
}
에 대한 링크는 "주어진 경로의 형식이 지원되지는."