AmazonS3にフォルダを作成する必要があります。次に、zipファイルでそのフォルダを変換する必要があります。DotNetZipLiberaryを使用して.zipファイルに変換しました。これがそのためのリンクです
http://dotnetzip.codeplex.com/wikipage?title=CS-例
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);
}
}
コードを実行すると、「指定されたパスの形式はサポートされていません」というエラーが表示されます。