• 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
Re: resume file with NSURLDownload
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: resume file with NSURLDownload


  • Subject: Re: resume file with NSURLDownload
  • From: "Julio Cesar Silva dos Santos" <email@hidden>
  • Date: Wed, 27 Dec 2006 10:36:21 -0200

You can use [NSURLDownload resumeData] which is an NSData (information about
how many bytes were downloaded, etc.) that you can save and load. The next
time you can call [NSURLDownload initWithResumeData:yourData delegate:self
path:pathToTheSavedFile] to restart the download. But be aware that this
type of data is provided by the server, NOT by NSURLDownload. So if the
server does not support resuming, it will always be NIL. And do not forget
to call [NSURLDownload setDeletesFileUponFailure:NO] when you start the
download, otherwise the file will be deleted as soon as the user cancel the
download.

--
Julio Cesar Silva dos Santos
email@hidden

2006/12/27, Lesin, Vladislav <email@hidden>:

Hi,

I use to download a large file from the web using the NSURLDownload
APIs.

Anyway if the user quits during the download, I lose the whole download.

And the next time the user 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) before
quitting,

and, at the next time the user re-launchs the SAME download, I append
the

new data to that file.



How can I do download a file step by step?

Any idea, sample code, would be appreciated. Thank you.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >resume file with NSURLDownload (From: "Lesin, Vladislav" <email@hidden>)

  • Prev by Date: resume file with NSURLDownload
  • Next by Date: Re: resume file with NSURLDownload
  • Previous by thread: resume file with NSURLDownload
  • Next by thread: Re: resume file with NSURLDownload
  • Index(es):
    • Date
    • Thread