consider following components of media download system:
- there server component generates private, expiring links s3 objects rather short lifetimes (see e.g. amazon s3 pre-signed link generation or amazon s3 expiration date?) - security reasons. in s3, expiry date part of link signature , part of generated url
- an app can request such link downloading potentially large media content
- should such link expire, app can re-request content, receiving new link (because of new signature) pointing same s3 object
this setup should allow resuming downloads beyond lifetime of download link (by stitching content downloaded various links).
with ios 7, have ios background transfer service , nsurlsession. sadly, seems when give link nsurlsession , link expires , download fails, content downloaded far lost.
so, there way resume download in above scenario using background transfer service?
how resume downloading same content second source? or can provide nsurlsessiondownloadtask fail-over handling when download attempt fails? or alternatively, there chance downloaded content "so far" in order stitching yourself?
alternatively, there strategies on server side solve (and no, don't want put own web server before link channel s3 traffic through)?
the idea can think of, create timer based on link expiration time
Comments
Post a Comment