Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我必须设计一些能够对服务器连接丢失做出反应并支持在 iOS 上在后台上传的东西。
如果由于连接丢失而导致上传失败,则应从失败的偏移量重新开始。
我有能力询问服务器它是否有文件的一部分或它有多少文件。
有没有办法将流式上传偏移到文件中的特定字节?
从 iOS 8 开始,AFAIK,您无法在 iOS 的后台流式传输上传。您必须提供要上传的文件,然后由系统硬链接,并交给nsurlsessiond. 这是来之不易的知识,但我从未在 Apple 文档中找到明确说明。
nsurlsessiond