0

我的用户在我的 Web 应用程序中上传他们的文件,该应用程序将他们的文件保存在具有最多可用空间的服务器中。结果是用户的一个文件夹可能包含保存在多个服务器中的多个文件。

现在我想让我的用户选择将他们的整个文件夹下载为 ZIP 文件。

有人可以提供适当的命名空间或指导实现此功能的最佳实践吗?

该应用程序是用 C# .NET 编写的。到目前为止我看到

1) http://msdn.microsoft.com/en-us/library/system.io.packaging.aspx

和...一起

2) http://msdn.microsoft.com/en-us/library/system.io.packaging.zippackage.aspx

我在寻找正确的方向吗?

4

1 回答 1

0

Let say a user has his files over 3 servers named server1,server3 and server6 point 1. You must have those locations somewhere? right?

now suppose server7 needs to pack those files into 1 zip and stream to the client.

You will need to download all those files to server7 and then pack those files to zip archive.

To download the files you can use webrequest method. Hope this is clear.

YOU WILL NEED TO DOWNLOAD THE FILES TO A SINGLE LOCATION BEFORE ZIPPING THEM, there is no shortcut over this.

于 2013-10-30T11:31:58.543 回答