Restart a download from the last byte
Restart a download from the last byte
- Subject: Restart a download from the last byte
- From: Lorenzo <email@hidden>
- Date: Mon, 19 Jan 2004 12:42:26 +0100
Hi,
thanks to some suggestion I got here, now I can very well download a large
file from the web using:
NSURLRequest *theRequest=[NSURLRequest requestWithURL:url
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:60.0];
NSURLDownload *theDownload=[[NSURLDownload alloc]
initWithRequest:theRequest delegate:self];
it works beautifully, but if the user quits during the download, the next
time he launchs the same download, I have to download the file again from
the beginning. Instead I would like to save the downloaded data to a file on
the local disk (e.g. File_001_Temp.txt) , and the next time the user
re-launch the download of the SAME file, I append the new data to that file.
How can I do that?
Of course I have to append the data to the already half-saved file ONLY if
the next dowload regards the SAME file on the SAME server. If the file on
the server has been updated, I have to reload it entirely.
Any idea, sample code, links? Thank you.
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.