标签: download

使用jQuery下载文件

如何在用户单击链接时提示下载.

例如,而不是:

<a href="uploads/file.doc">Download Here</a>
Run Code Online (Sandbox Code Playgroud)

我可以用:

<a href="#">Download Here</a>

 $('a').click... //Some jquery to download the file
Run Code Online (Sandbox Code Playgroud)

这样,Google就不会将我的HREF和私人文件编入索引.

这可以用jQuery完成,如果是这样,怎么样?或者应该用PHP或其他东西来完成?

jquery file download

108
推荐指数
7
解决办法
42万
查看次数

禁用VS'"下载公共符号"

当我在VS2010中调试我的ASP.NET webapp时,会出现一个标题为"正在下载公共符号"的对话框.

如何指示Visual Studio 不要尝试此操作?

debugging download visual-studio

105
推荐指数
3
解决办法
4万
查看次数

Visual C++ 2008 Express下载链接死?

我目前正在使用的编程类使用Visual C++ 2008,并且在家工作,我们可以选择获取快速版.我无法在网站上的任何地方找到下载链接,并且Microsoft支持绝对没有帮助.我也考虑过使用Visual C++ 2010,但我听说没有太多机会兼容性.如果有人有关于我可以单独获取Visual Studio 2008 express ISO或C++ 2008 Express下载的信息,请告诉我.

c++ ide download

104
推荐指数
2
解决办法
8万
查看次数

只需一个操作即可下载多个文件

我不确定使用标准网络技术是否可行.

我希望用户能够在一个操作中下载多个文件.这是文件旁边的单击复选框,然后获取所有已检查的文件.

是否有可能 - 如果是的话,你建议采用什么基本策略.我知道我可以使用comets技术来创建触发HttpResponse的服务器端事件,但我希望有一种更简单的方法.

web-applications http download

103
推荐指数
7
解决办法
17万
查看次数

使用PHP发送文件时可恢复下载?

我们使用PHP脚本来进行隧道文件下载,因为我们不希望公开可下载文件的绝对路径:

header("Content-Type: $ctype");
header("Content-Length: " . filesize($file));
header("Content-Disposition: attachment; filename=\"$fileName\"");
readfile($file);
Run Code Online (Sandbox Code Playgroud)

不幸的是,我们注意到最终用户无法恢复通过此脚本传递的下载.

有没有办法支持这种基于PHP的解决方案的可恢复下载?

php download resume-download

101
推荐指数
6
解决办法
6万
查看次数

从URL下载Windows批处理文件文件

我正在尝试使用Windows批处理文件从网站(例如http://www.example.com/package.zip)下载文件.我在编写下面的函数时收到错误代码:

xcopy /E /Y "http://www.example.com/package.zip"
Run Code Online (Sandbox Code Playgroud)

批处理文件似乎不喜欢http之后的"/".有没有办法逃避这些字符,所以它不假设它们是函数参数?

windows scripting batch-file download

101
推荐指数
9
解决办法
41万
查看次数

Youtube_dl:错误:YouTube 说:无法提取视频数据

我正在用 Python 3 制作一个小的图形界面,它应该下载一个带有 URL 的 youtube 视频。我youtube_dl为此使用了该模块。这是我的代码:

import youtube_dl # Youtube_dl is used for download the video

ydl_opt = {"outtmpl" : "/videos/%(title)s.%(ext)s", "format": "bestaudio/best"} # Here we give some advanced settings. outtmpl is used to define the path of the video that we are going to download

def operation(link):
    """
    Start the download operation
    """
    try:
        with youtube_dl.YoutubeDL(ydl_opt) as yd: # The method YoutubeDL() take one argument which is a dictionary for changing default settings
            video = …
Run Code Online (Sandbox Code Playgroud)

python youtube download python-3.x youtube-dl

97
推荐指数
8
解决办法
11万
查看次数

设置webClient.DownloadFile()的超时

我正在使用webClient.DownloadFile()下载文件,我可以为此设置超时,这样如果它无法访问文件就不会花这么长时间吗?

.net c# webclient download

91
推荐指数
2
解决办法
10万
查看次数

使用ajax请求下载文件

我想点击按钮时发送"ajax下载请求",所以我试着这样做:

JavaScript的:

var xhr = new XMLHttpRequest();
xhr.open("GET", "download.php");
xhr.send();
Run Code Online (Sandbox Code Playgroud)

的download.php:

<?
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-Disposition: attachment; filename= file.txt");
header("Content-Transfer-Encoding: binary");    
readfile("file.txt");
?>
Run Code Online (Sandbox Code Playgroud)

但是没有按预期工作,我该怎么办?先感谢您

javascript php ajax file download

87
推荐指数
5
解决办法
27万
查看次数

如何从网址下载图片

如果网址在链接末尾没有图像格式,是否有办法直接从c#中的网址下载图像?网址示例:

https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-xpf1/v/t34.0-12/10555140_10201501435212873_1318258071_n.jpg?oh=97ebc03895b7acee9aebbde7d6b002bf&oe=53C9ABB0&__gda__=1405685729_110e04e71d969d392b63b27ec4f4b24a
Run Code Online (Sandbox Code Playgroud)

我知道当网址以图像格式结束时如何下载图像.例如:

http://img1.wikia.nocookie.net/__cb20101219155130/uncyclopedia/images/7/70/Facebooklogin.png
Run Code Online (Sandbox Code Playgroud)

c# url download

86
推荐指数
6
解决办法
15万
查看次数