Download progress is not display in NSProgress when try download file from GoDaddy server url

124 Views Asked by At

I want to donwload mp3 file from goDaddy server and display donwload process in NSPorgress. That's why I'm using Heikowi/HWIFileDownload this demo to refrence.

Demo is working fine with start, stop,cancel,pause and resume functionality. But in this demo I can't able to download url from GoDaddy server.

How can I solve this?

I'm using this below url: http://starindustries.co/assets/mp3/Exotic.mp3

1

There are 1 best solutions below

1
Nitin Gohel On BEST ANSWER

I just found the solution that make your user class you just need to change following code in Download.m find start Method

Replace following existing line of code:

NSURLRequest *request = [NSURLRequest requestWithURL:self.url];

With:

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:self.url];
[request setValue:@"identity" forHTTPHeaderField:@"Accept-Encoding"];

That's it your issue going to be solve. you getting actual length instead of -1