在线下载文件并解压缩? [英] download and unzip a file online?

查看:113
本文介绍了在线下载文件并解压缩?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



当用户单击按钮时,是否可以使用vb 2008从网站下载(但不能保存到用户的计算机)并解压缩zip文件?

感谢您的帮助

amir



is there a way of downloading (but not save to the user''s computer) and unzipping a zip file from a website using vb 2008 when a user clicks a button?

thanks for any help

amir

推荐答案

好,是的,但不是使用ASP.NET(我注意到您没有标记问题ASP.NET).如果您为网页编写ActiveX插件,并且在用户允许的情况下,它可能具有执行此操作的权限.除非我没有看到它如何解压缩文件,除非它先下载了文件,除非您忘记了zip文件(这变得无关紧要),只是要从服务器复制下来的文件.当然,您的用户将必须对他们真正信任您的网站,以允许此类代码在其浏览器中运行.如果您不是为公司/内部网站编写此代码,那么我希望大多数人都不会这样做.我肯定不会.
Well, yes, but not with ASP.NET ( I note you didn''t tag your question ASP.NET ). If you write an ActiveX plug in for a web page, it will probably have the permissions to do that, if the user allows it to run. Except I don''t see how it can unzip a file unless it downloads it first, unless you forget the zip ( which becomes irrelevant ) and just have the files to copy down from the server. Of course, your users will have to REALLY trust your site for them to allow such code to run in their browser. If you''re not writing this for a company/internal site, I expect most people would not allow it. I sure wouldn''t.


某些ZIP实用程序势必为流数据源而不是文件路径提供支持.您可以将ZIP文件作为流下载,并将其传递到ZIP实用程序以解压缩,而无需接触文件系统.

假设您正在谈论Windows窗体(或WPF或控制台)应用程序.如果您使用的是ASP.NET,那么Graus的想法是正确的(一个ActiveX插件).
Some ZIP utilities are bound to offer support for streamed data sources rather than file paths. You can download the ZIP file as a stream and pass it to the ZIP utility to unzip without it touching the file system.

That is assuming you are talking about a Windows Forms (or WPF or Console) application. If you are using ASP.NET, Graus has the right idea (an ActiveX plugin).


这篇关于在线下载文件并解压缩?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆