Docs: Documentation Update authored by RWTHApp Service's avatar RWTHApp Service
...@@ -4,8 +4,21 @@ The allows to zip a folder and/or upload a whole stream in chunks to a S3 object ...@@ -4,8 +4,21 @@ The allows to zip a folder and/or upload a whole stream in chunks to a S3 object
For example: For example:
``` ```
var zipUtilities = new ZipUtilities(_s3MultipartStreamConfiguration); // uploading
var zipUtilities = new ZipUtilities(s3MultipartStreamConfiguration);
zipUtilities.ZipAndUploadFolder(@"c:\temp\test", "test.zip"); zipUtilities.ZipAndUploadFolder(@"c:\temp\test", "test.zip");
``` ```
```
// downloading
var zipUtilities = new ZipUtilities(_s3MultipartStreamConfiguration);
using (var s3MultipartDownloadStream = new S3MultipartDownloadStream(key, s3MultipartStreamConfiguration))
{
using (var archive = new ZipArchive(s3MultipartDownloadStream, ZipArchiveMode.Read, true))
{
zipUtilities.UnzipToFolder(archive, @"c:\temp\test2\");
}
}
```
A zip file of the folder will be in S3 under the key test.zip. A zip file of the folder will be in S3 under the key test.zip.
\ No newline at end of file