You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your library is very useful but I am facing one issue.
I have audio files on my server and I am not calling any API and directly giving path of my audio files to download using your library. Now when download starts in below function, I get totalBytesExpectedToWrite = -1 always. My audio files are around 1MB. It is strange and I am not able to solve it. Can you please help me ? one other thing I noticed is that when I download image, then it is giving me perfect totalBytesExpectedToWrite. but not for audio. In below function, I am getting totalBytesExpectedToWrite = -1.
@KrLikeblue because the service which you download from is not support the expectedfilesize。
can you use curl to test? like this curl -I "the url of you downloadfile" --header "Range: bytes=0-"
I've received below data, where I can check there is content-range is available. How can I get it?
HTTP/1.1 206 Partial Content
Server: nginx/1.4.0
Date: Fri, 24 Feb 2017 09:12:07 GMT
Content-Type: video/mp4
Connection: keep-alive
Display: staticcontent_sol
Expires: Sun, 26 Mar 2017 09:12:07 UTC
Response: 206
Vary: Origin,Accept-Encoding,X-APP-JSON
X-Middleton-Display: staticcontent_sol
X-Middleton-Response: 206
Set-Cookie: ezouid_6183=948056624; Path=/; Domain=sample-videos.com; Expires=Thu, 14 Feb 2019 09:12:07 UTC
Set-Cookie: lp_6183=http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4; Path=/; Domain=sample-videos.com; Expires=Fri, 24 Feb 2017 11:12:07 UTC
Set-Cookie: ezoadgid_6183=16; Path=/; Domain=sample-videos.com; Expires=Fri, 24 Feb 2017 09:42:07 UTC
Set-Cookie: active_template::6183=%2Farticle%2Ftwo_column_no_inner_ad; Path=/; Domain=sample-videos.com; Expires=Sun, 26 Feb 2017 09:12:07 UTC
Set-Cookie: ezoab_6183=mod4-; Path=/; Domain=sample-videos.com; Expires=Fri, 24 Feb 2017 09:42:07 UTC
Content-Range: bytes 0-1055735/1055736
Etag: "34168e-101bf8-5357ce5f7ea80"
Last-Modified: Sat, 18 Feb 2017 20:29:48 GMT
Cache-Control: public, max-age=2592000
Hello,
Your library is very useful but I am facing one issue.
I have audio files on my server and I am not calling any API and directly giving path of my audio files to download using your library. Now when download starts in below function, I get totalBytesExpectedToWrite = -1 always. My audio files are around 1MB. It is strange and I am not able to solve it. Can you please help me ? one other thing I noticed is that when I download image, then it is giving me perfect totalBytesExpectedToWrite. but not for audio. In below function, I am getting totalBytesExpectedToWrite = -1.
downloadTask:(NSURLSessionDownloadTask *)downloadTask
didWriteData:(int64_t)bytesWritten
totalBytesWritten:(int64_t)totalBytesWritten
totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite
Thanks,
Patel
The text was updated successfully, but these errors were encountered: