开发者

iOS: offset byte pointer on a file?

I'm working on being able to resume the upload of files in my iOS project. I'd like to be able to say something like 'begin this upload starting with an offset of 1000 bytes'. What's the best way to handle this problem? Getting a reference to the file is trivial.开发者_开发问答 I'm not sure how to start an NSURLConnection though, using an offset.


I assume you're talking about HTTP? Resuming uploads is done by supplying a Content-Range HTTP header. See RFC 2616 for details. Essentially, you'll work out the correct header, then only supply the bytes for that range to the NSURLConnection.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜