- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
这是 my previous question 的延续我不是注册用户时发布的。作为复习,我正在尝试从我的 Yahoo! 继续下载一个大文件!下载中断时的网站服务器。我以前认为中断是由于 100 秒的超时限制(因为 Yahoo! 对用户编写的脚本强制执行该时间限制)。然而,当我测量下载中断的时间时,我发现中断时间变化很大(有时下载不间断地运行不到 100 秒,有时长达 7 分钟)。所以我不知道超时的原因,我只是想解决它们。
我尝试了 naikus 的建议(谢谢)而且,根据 http header 字段的转储,我的 Yahoo!网站服务器确实识别了“范围”属性,该属性应该允许下载在中断的偏移处恢复。不幸的是,尽管字节范围在恢复连接的 http header 中看起来是正确的,但传输的内容总是在文件开头重新开始。 (我的测试文件是一个由 50,000 个 4 字节整数组成的数组,从 0 开始递增。我下载的文件总是在发生下载中断的每个偏移量处从 0 开始重新计数。)
我应该提出其他一些 http 连接属性请求来获取 Yahoo!服务器实际跳转到在 header 的字节范围中指定的文件偏移量?这是代码及其转储的内容:
// Setup connection.
URL url = new URL(strUrl[0]);
URLConnection connection = url.openConnection();
downloaded = Integer.parseInt(strUrl[3]);
if (downloaded > 0) {
connection.setRequestProperty("Range", "bytes="+downloaded+"-");
connection.connect();
fileLength = mDownloadFileLength;
Log.d("AsyncDownloadFile",
"new download seek: " + downloaded +
"; lengthFile: " + fileLength);
}
else {
connection.connect();
downloaded = 0;
fileLength = connection.getContentLength();
mDownloadFileLength = fileLength;
}
Map<String, List<String>> map = connection.getHeaderFields();
Log.d("AsyncDownloadFile", "header fields: " + map.toString());
// Setup streams and buffers.
input = new BufferedInputStream(url.openStream(), 8192);
outFile = new RandomAccessFile(strUrl[1], "rw");
if (downloaded > 0)
outFile.seek(downloaded);
byte data[] = new byte[1024];
// Download file.
for (int count=0, i=0; (count=input.read(data, 0, 1024)) != -1; i++) {
outFile.write(data, 0, count);
downloaded += count;
if (downloaded >= fileLength)
break;
// Display progress.
Log.d("AsyncDownloadFile", "bytes: " + downloaded);
if ((i%10) == 0)
publishProgress((int)(downloaded*100/fileLength));
if (mFlagDisableAsyncTask) {
downloaded = 0;
break;
}
}
// Close streams.
outFile.close();
input.close();
转储:
@ 4:08:24
D/AsyncDownloadFile( 2372): header fields: {p3p=[policyref="http://info.yahoo.co
m/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi
OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA PO
L HEA PRE LOC GOV"], content-type=[application/zip], connection=[close], last-mo
dified=[Fri, 06 Aug 2010 14:47:50 GMT], content-length=[2000000], age=[0], serve
r=[YTS/1.17.13], accept-ranges=[bytes], date=[Fri, 06 Aug 2010 20:08:33 GMT]}
D/AsyncDownloadFile( 2372): bytes: 1024
D/AsyncDownloadFile( 2372): bytes: 1033
D/AsyncDownloadFile( 2372): bytes: 2057
D/AsyncDownloadFile( 2372): bytes: 2493
D/AsyncDownloadFile( 2372): bytes: 3517
D/AsyncDownloadFile( 2372): bytes: 3953
.
.
.
@ 4:13:25
D/AsyncDownloadFile( 2372): bytes: 386473
D/AsyncDownloadFile( 2372): bytes: 387497
D/AsyncDownloadFile( 2372): bytes: 387933
D/AsyncDownloadFile( 2372): new download seek: 387933; lengthFile: 2000000
D/AsyncDownloadFile( 2372): header fields: {p3p=[policyref="http://info.yahoo.co
m/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi
OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA PO
L HEA PRE LOC GOV"], content-type=[application/zip], connection=[close], last-mo
dified=[Fri, 06 Aug 2010 14:47:50 GMT], content-length=[1612067], age=[0], serve
r=[YTS/1.17.13], accept-ranges=[bytes], date=[Fri, 06 Aug 2010 20:13:29 GMT], co
ntent-range=[bytes 387933-1999999/2000000]}
D/AsyncDownloadFile( 2372): bytes: 388957
D/AsyncDownloadFile( 2372): bytes: 389981
D/AsyncDownloadFile( 2372): bytes: 390409
D/AsyncDownloadFile( 2372): bytes: 391433
D/AsyncDownloadFile( 2372): bytes: 391869
D/AsyncDownloadFile( 2372): bytes: 392893
.
.
.
@ 4:18:45
D/AsyncDownloadFile( 2372): bytes: 775413
D/AsyncDownloadFile( 2372): bytes: 775849
D/AsyncDownloadFile( 2372): bytes: 776873
D/AsyncDownloadFile( 2372): bytes: 777309
D/AsyncDownloadFile( 2372): new download seek: 777309; lengthFile: 2000000
D/AsyncDownloadFile( 2372): header fields: {p3p=[policyref="http://info.yahoo.co
m/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi
OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA PO
L HEA PRE LOC GOV"], content-type=[application/zip], connection=[close], last-mo
dified=[Fri, 06 Aug 2010 14:47:50 GMT], content-length=[1222691], age=[0], serve
r=[YTS/1.17.13], accept-ranges=[bytes], date=[Fri, 06 Aug 2010 20:18:54 GMT], co
ntent-range=[bytes 777309-1999999/2000000]}
D/dalvikvm( 2372): GC_FOR_MALLOC freed 11019 objects / 470560 bytes in 155ms
D/AsyncDownloadFile( 2372): bytes: 778333
D/AsyncDownloadFile( 2372): bytes: 779357
D/AsyncDownloadFile( 2372): bytes: 779790
D/AsyncDownloadFile( 2372): bytes: 780814
D/AsyncDownloadFile( 2372): bytes: 781250
D/AsyncDownloadFile( 2372): bytes: 782274
.
.
.
@ 4:23:45
D/AsyncDownloadFile( 2372): bytes: 1163334
D/AsyncDownloadFile( 2372): bytes: 1163770
D/AsyncDownloadFile( 2372): bytes: 1164794
D/AsyncDownloadFile( 2372): bytes: 1165230
D/AsyncDownloadFile( 2372): new download seek: 1165230; lengthFile: 2000000
D/AsyncDownloadFile( 2372): header fields: {p3p=[policyref="http://info.yahoo.co
m/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi
OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA PO
L HEA PRE LOC GOV"], content-type=[application/zip], connection=[close], last-mo
dified=[Fri, 06 Aug 2010 14:47:50 GMT], content-length=[834770], age=[0], server
=[YTS/1.17.13], accept-ranges=[bytes], date=[Fri, 06 Aug 2010 20:23:47 GMT], con
tent-range=[bytes 1165230-1999999/2000000]}
D/AsyncDownloadFile( 2372): bytes: 1166246
D/AsyncDownloadFile( 2372): bytes: 1167270
D/AsyncDownloadFile( 2372): bytes: 1167706
D/AsyncDownloadFile( 2372): bytes: 1168730
D/AsyncDownloadFile( 2372): bytes: 1169754
D/AsyncDownloadFile( 2372): bytes: 1170778
.
.
.
@ 4:30:25
D/AsyncDownloadFile( 2372): bytes: 1551255
D/AsyncDownloadFile( 2372): bytes: 1551691
D/AsyncDownloadFile( 2372): bytes: 1552715
D/AsyncDownloadFile( 2372): bytes: 1553151
D/AsyncDownloadFile( 2372): new download seek: 1553151; lengthFile: 2000000
D/AsyncDownloadFile( 2372): header fields: {p3p=[policyref="http://info.yahoo.co
m/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi
OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA PO
L HEA PRE LOC GOV"], content-type=[application/zip], connection=[close], last-mo
dified=[Fri, 06 Aug 2010 14:47:50 GMT], content-length=[446849], age=[0], server
=[YTS/1.17.13], accept-ranges=[bytes], date=[Fri, 06 Aug 2010 20:30:44 GMT], con
tent-range=[bytes 1553151-1999999/2000000]}
D/AsyncDownloadFile( 2372): bytes: 1554167
D/AsyncDownloadFile( 2372): bytes: 1554184
D/AsyncDownloadFile( 2372): bytes: 1555208
D/AsyncDownloadFile( 2372): bytes: 1555644
D/AsyncDownloadFile( 2372): bytes: 1556668
D/AsyncDownloadFile( 2372): bytes: 1557104
.
.
.
@ 4:37:10
D/AsyncDownloadFile( 2372): bytes: 1939188
D/AsyncDownloadFile( 2372): bytes: 1939624
D/AsyncDownloadFile( 2372): bytes: 1940648
D/AsyncDownloadFile( 2372): bytes: 1941084
D/AsyncDownloadFile( 2372): new download seek: 1941084; lengthFile: 2000000
D/dalvikvm( 2372): GC_FOR_MALLOC freed 13701 objects / 604600 bytes in 128ms
D/AsyncDownloadFile( 2372): header fields: {p3p=[policyref="http://info.yahoo.co
m/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi
OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA PO
L HEA PRE LOC GOV"], content-type=[application/zip], connection=[close], last-mo
dified=[Fri, 06 Aug 2010 14:47:50 GMT], content-length=[58916], age=[0], server=
[YTS/1.17.13], accept-ranges=[bytes], date=[Fri, 06 Aug 2010 20:37:16 GMT], cont
ent-range=[bytes 1941084-1999999/2000000]}
D/AsyncDownloadFile( 2372): bytes: 1942108
D/AsyncDownloadFile( 2372): bytes: 1942117
D/AsyncDownloadFile( 2372): bytes: 1943141
D/AsyncDownloadFile( 2372): bytes: 1943577
D/AsyncDownloadFile( 2372): bytes: 1944601
D/AsyncDownloadFile( 2372): bytes: 1945037
.
.
.
@ 4:38:30
D/AsyncDownloadFile( 2372): bytes: 1993217
D/AsyncDownloadFile( 2372): bytes: 1994241
D/AsyncDownloadFile( 2372): bytes: 1994677
D/AsyncDownloadFile( 2372): bytes: 1995701
D/AsyncDownloadFile( 2372): bytes: 1996137
D/AsyncDownloadFile( 2372): bytes: 1997161
D/AsyncDownloadFile( 2372): bytes: 1997597
D/AsyncDownloadFile( 2372): bytes: 1998621
D/AsyncDownloadFile( 2372): bytes: 1999057
D/onPostExecute( 2372): download: unsuccessful
- - -
根据 BalusC 的提示(谢谢),我修改了连接设置,但 Yahoo!服务器在每次中断时继续重置到文件的开头。这是更改后的代码和生成的转储:
// Setup connection.
URL url = new URL(strUrl[0]);
URLConnection connection = url.openConnection();
downloaded = Integer.parseInt(strUrl[3]);
if (downloaded == 0) {
connection.connect();
strLastModified = connection.getHeaderField("Last-Modified");
fileLength = connection.getContentLength();
mDownloadFileLength = fileLength;
}
else {
connection.setRequestProperty("Range", "bytes=" + downloaded + "-");
connection.setRequestProperty("If-Range", strLastModified);
connection.connect();
fileLength = mDownloadFileLength;
Log.d("AsyncDownloadFile",
"new download seek: " + downloaded +
"; lengthFile: " + fileLength);
}
map = connection.getHeaderFields();
Log.d("AsyncDownloadFile", "header fields: " + map.toString());
转储:
@12:36:40 started
D/AsyncDownloadFile( 413): header fields: {p3p=[policyref="http://info.yahoo.c
m/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTP
OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA P
L HEA PRE LOC GOV"], content-type=[application/zip], connection=[close], last-m
dified=[Fri, 06 Aug 2010 14:47:50 GMT], content-length=[2000000], age=[0], serv
r=[YTS/1.17.13], accept-ranges=[bytes], date=[Sat, 07 Aug 2010 04:36:56 GMT]}
D/AsyncDownloadFile( 413): bytes: 1024
D/AsyncDownloadFile( 413): bytes: 2048
D/AsyncDownloadFile( 413): bytes: 2476
D/AsyncDownloadFile( 413): bytes: 3500
D/AsyncDownloadFile( 413): bytes: 3936
...
@12:39:20 interrupted
D/AsyncDownloadFile( 413): bytes: 388068
D/AsyncDownloadFile( 413): bytes: 389092
D/AsyncDownloadFile( 413): bytes: 389376
D/AsyncDownloadFile( 413): new download seek: 389376; lengthFile: 2000000
D/AsyncDownloadFile( 413): header fields: {p3p=[policyref="http://info.yahoo.co
m/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi
OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA PO
L HEA PRE LOC GOV"], content-type=[application/zip], connection=[close], last-mo
dified=[Fri, 06 Aug 2010 14:47:50 GMT], content-length=[1610624], age=[0], serve
r=[YTS/1.17.13], accept-ranges=[bytes], date=[Sat, 07 Aug 2010 04:39:21 GMT], co
ntent-range=[bytes 389376-1999999/2000000]}
D/AsyncDownloadFile( 413): bytes: 390400
D/AsyncDownloadFile( 413): bytes: 390409
D/AsyncDownloadFile( 413): bytes: 391433
D/AsyncDownloadFile( 413): bytes: 391869
...
@12:44:10 interrupted
D/AsyncDownloadFile( 413): bytes: 775413
D/AsyncDownloadFile( 413): bytes: 775849
D/AsyncDownloadFile( 413): bytes: 776873
D/AsyncDownloadFile( 413): bytes: 777309
D/AsyncDownloadFile( 413): new download seek: 777309; lengthFile: 2000000
D/AsyncDownloadFile( 413): header fields: {p3p=[policyref="http://info.yahoo.co
m/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi
OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA PO
L HEA PRE LOC GOV"], content-type=[application/zip], connection=[close], last-mo
dified=[Fri, 06 Aug 2010 14:47:50 GMT], content-length=[1222691], age=[0], serve
r=[YTS/1.17.13], accept-ranges=[bytes], date=[Sat, 07 Aug 2010 04:44:20 GMT], co
ntent-range=[bytes 777309-1999999/2000000]}
D/dalvikvm( 413): GC_FOR_MALLOC freed 10869 objects / 465664 bytes in 122ms
D/AsyncDownloadFile( 413): bytes: 778333
D/AsyncDownloadFile( 413): bytes: 778342
D/AsyncDownloadFile( 413): bytes: 779366
D/AsyncDownloadFile( 413): bytes: 779802
...
@12:49:30 interrupted
D/AsyncDownloadFile( 413): bytes: 1163782
D/AsyncDownloadFile( 413): bytes: 1164806
D/AsyncDownloadFile( 413): bytes: 1165242
D/AsyncDownloadFile( 413): new download seek: 1165242; lengthFile: 2000000
D/AsyncDownloadFile( 413): header fields: {p3p=[policyref="http://info.yahoo.co
m/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi
OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA PO
L HEA PRE LOC GOV"], content-type=[application/zip], connection=[close], last-mo
dified=[Fri, 06 Aug 2010 14:47:50 GMT], content-length=[834758], age=[0], server
=[YTS/1.17.13], accept-ranges=[bytes], date=[Sat, 07 Aug 2010 04:49:43 GMT], con
tent-range=[bytes 1165242-1999999/2000000]}
D/AsyncDownloadFile( 413): bytes: 1166266
D/AsyncDownloadFile( 413): bytes: 1167290
D/AsyncDownloadFile( 413): bytes: 1167718
D/AsyncDownloadFile( 413): bytes: 1168742
...
@12:55:30 interrupted
D/AsyncDownloadFile( 413): bytes: 1552722
D/AsyncDownloadFile( 413): bytes: 1553158
D/AsyncDownloadFile( 413): bytes: 1554182
D/AsyncDownloadFile( 413): bytes: 1554618
D/AsyncDownloadFile( 413): new download seek: 1554618; lengthFile: 2000000
D/AsyncDownloadFile( 413): header fields: {p3p=[policyref="http://info.yahoo.co
m/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi
OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA PO
L HEA PRE LOC GOV"], content-type=[application/zip], connection=[close], last-mo
dified=[Fri, 06 Aug 2010 14:47:50 GMT], content-length=[445382], age=[0], server
=[YTS/1.17.13], accept-ranges=[bytes], date=[Sat, 07 Aug 2010 04:55:39 GMT], con
tent-range=[bytes 1554618-1999999/2000000]}
D/AsyncDownloadFile( 413): bytes: 1555642
D/AsyncDownloadFile( 413): bytes: 1556666
D/AsyncDownloadFile( 413): bytes: 1557094
D/AsyncDownloadFile( 413): bytes: 1558118
...
@12:57:20 interrupted
D/AsyncDownloadFile( 413): bytes: 1941834
D/AsyncDownloadFile( 413): bytes: 1942858
D/AsyncDownloadFile( 413): bytes: 1943882
D/AsyncDownloadFile( 413): bytes: 1943994
D/AsyncDownloadFile( 413): new download seek: 1943994; lengthFile: 2000000
D/AsyncDownloadFile( 413): header fields: {p3p=[policyref="http://info.yahoo.co
m/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi
OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA PO
L HEA PRE LOC GOV"], content-type=[application/zip], connection=[close], last-mo
dified=[Fri, 06 Aug 2010 14:47:50 GMT], content-length=[56006], age=[0], server=
[YTS/1.17.13], accept-ranges=[bytes], date=[Sat, 07 Aug 2010 04:57:15 GMT], cont
ent-range=[bytes 1943994-1999999/2000000]}
D/dalvikvm( 413): GC_FOR_MALLOC freed 13617 objects / 602200 bytes in 165ms
D/AsyncDownloadFile( 413): bytes: 1945018
D/AsyncDownloadFile( 413): bytes: 1946042
D/AsyncDownloadFile( 413): bytes: 1946470
D/AsyncDownloadFile( 413): bytes: 1947494
...
@12:58:10 finished
D/AsyncDownloadFile( 413): bytes: 1996103
D/AsyncDownloadFile( 413): bytes: 1997127
D/AsyncDownloadFile( 413): bytes: 1997563
D/AsyncDownloadFile( 413): bytes: 1998587
D/AsyncDownloadFile( 413): bytes: 1999023
D/onPostExecute( 413): downloaded: unsuccessful
最佳答案
要恢复下载,您不仅需要发送 Range
请求头,还有 If-Range
应包含唯一文件标识符或文件修改时间戳的请求 header 。
如果服务器返回 ETag
初始下载的响应 header ,那么您应该在后续恢复请求的 If-Range
header 中使用它。或者如果它返回 Last-Modified
响应头,那么你应该在 If-Range
请求头中使用它。
查看您的日志,服务器已发送 Last-Modified
响应 header 。因此,您应该在恢复请求的 If-Range
header 中将其发送回去。
// Initial download.
String lastModified = connection.getHeaderField("Last-Modified");
// ...
// Resume download.
connection.setRequestProperty("If-Range", lastModified);
服务器将使用此信息来验证您请求的文件是否完全相同。
关于java - 如何恢复中断的下载 - 第 2 部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3428102/
当我尝试通过我的 .exe 文件从 url 下载 .pdf 文件时出现以下错误。 The server committed a protocol violation. Section=Response
我是一家非营利组织的 G Suite 管理员,刚刚发现数据导出功能,这似乎是个人帐户的外卖。 导出文件已准备好,现在可以从 Google Cloud Platform Storage 中的存储桶下载。
导航 引言 总体思路 七牛云相关的配置文件 获取七牛云上传token 相关类定义 核心代码实现 获取七牛云图片下载链接 公开空
这不是后端编程问题。我只能修改标记或脚本(或文档本身)。我在这里问的原因是因为我对适当术语的所有搜索都不可避免地导致有关编程此功能的问题和解决方案。我不是试图通过编程来强制它;我必须找出此 PDF 行
您好,我已在 Google AdSense 中注册,我想使用适用于 iOS 的 SDK,但目前我找不到 SDK 下载链接。 我的申请已获批准。 任何人都知道如何下载这个sdk。 我使用这个链接来描述如
我需要为当前在 SourceForge 上的 github 项目提供二进制文件和文档。在那里,我可以为我需要的下载提供一个目录结构,因为我必须为大约 10 个不同的操作系统提供几个版本。 github
我从 Canvas 下载绘图时遇到问题。这是我的代码: function downloadCanvas(link, canvasId, filename) { link.href =
ASP.NET 项目 我将使用 Azure 进行存储。问题(要求): 在我的项目中,我让注册用户下载文件。但我不希望用户将此下载链接分享给未注册的人(例如:我给注册用户的下载链接只能在他们的计算机上下
我编写了一个servlet,用于检查http header ,但我不知道为什么当页面加载时,它会自动开始下载。 /* * To change this template, choose To
我正在尝试将下载添加到我的网络浏览器,但遇到的问题是获取您尝试下载的文件的名称。这是我的下载代码: engine.locationProperty().addListener(new ChangeLi
我正在尝试下载网站的 html: String encoding = "UTF-8"; HttpContext localContext = new BasicHttpContext();
我制作了一个带有“开始下载”按钮的框架,用于从网站下载 JAR。 问题是每当我点击开始下载按钮时,整个框架就会卡住,直到下载完成,然后就正常了。 我该如何解决这个问题? 这是单击按钮时执行的代码 p
我得到这段代码来实现一些东西,它可以帮助我从给定的 URL 下载文件。 -(void)URLSession:(NSURLSession *)session downloadTask:(NSURLSes
我正在尝试创建一个 Controller 来使用流方法下载和上传文件,在我的例子中,所有文件都作为 Blob 保存在数据库中。我阅读了 Jboss Netty 的文档,但我认为这不是我的最佳解决方案。
下载并保存文件 let destination: DownloadRequest.DownloadFileDestination = { _, _ in // var fileURL = sel
使用 htaccess 我基本上试图禁止访问该页面,即 http://example.com , 但它仍然允许人们下载文件,如果他们有直接链接即 http://example.com/hi.zip .
我正在寻求将脚本与我的控制面板集成,并且由于我是新手脚本编写者而遇到问题。我想做的是用 1 个脚本下载一个文件并解压它。 示例: wget http://example.com/example.tar
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭 7 年前。
这个问题在这里已经有了答案: Top techniques to avoid 'data scraping' from a website database (14 个答案) 关闭 5 年前。 我有
这个问题在这里已经有了答案: Reading and parsing email from Gmail using C#, C++ or Python (6 个答案) 关闭 7 年前。 我只是想,是
我是一名优秀的程序员,十分优秀!