• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Restart a download from the last byte
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Can we set the height for a specific row in an NSTableView?
  • Next by Date: Re: encoding structs (NSCoder / NSArchiver issue)
  • Previous by thread: Re: Can we set the height for a specific row in an NSTableView?
  • Next by thread: How to know the name of the Outlet we are typing in?
  • Index(es):
    • Date
    • Thread