如何在单个下载功能中下载各种类型的文件.请给我一个代码片段

编程入门 行业动态 更新时间:2024-10-28 10:30:00
本文介绍了如何在单个下载功能中下载各种类型的文件.请给我一个代码片段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经将所有应试者上传的文件保存在一个文件夹中.如何在单个下载功能中下载这些各种类型的文件.请给我一个代码段

I have saved the files which have been uploaded by all candidates in a folder. How to download these various types of files in a single download function. Please give me a code snippet

推荐答案

传统解决方案很丑陋:用户输入要上传的文件数,如果以表格的形式进行控制,则页面会创建适当的编号,用户提交并由服务器端处理HTTP帖子.有更多基于ActiveX的多选对话框的优雅解决方案,但这些解决方案仅适用于Windows平台,因此不可接受. 我找到了一个非常不错的演示: blueimp.github/jQuery-File-Upload/ [ ^ ]. 您可以下载页面,计算所有脚本,样式表和其他资源的URL,也可以下载它们.这样,您将获得此页面的本地副本,并查看其工作方式.
—SA
Traditional solution is ugly: the user inputs how many files to upload, the page created appropriate number if control in the form, the user submits it and server-side process the HTTP post. There are more elegant solutions based on ActiveX-based multiselect dialog box, but these solutions are only for Windows platform and hence not acceptable. I found a very nice demo: blueimp.github/jQuery-File-Upload/[^]. You can download the page, calculate URLs of all scripts, style sheets and other resources and download them, too. This way, you will get a local copy of this page and see how it works.
—SA

您可以压缩文件,然后将其一起下载.请参考 www.4guysfromrolla/articles/092910-1.aspx [ ^ ] www.vwd-cms/Forum/Forums.aspx?topic=18 [^ ] You can compress file and then download them together. Refer this www.4guysfromrolla/articles/092910-1.aspx[^] www.vwd-cms/Forum/Forums.aspx?topic=18[^]

更多推荐

如何在单个下载功能中下载各种类型的文件.请给我一个代码片段

本文发布于:2023-11-03 19:49:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1555931.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:请给   片段   类型   代码   功能

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!