When I download a URL like this one: http://tinyurl.com/csr2xc7 then ASIHTTPRequest’s temporaryFile is created and the data is not stored in memory. However with a URL like this: http://www.youtube-mp3.org/get?video_id=2MDYBFKjx2I&h=03492626150e7377f6def57cd3bdc16d the temporary file is not created.
The difference is that the second URL immediately starts a download when you open it, whereas the first URL only displays a video that can be downloaded using a request. Also when you open the second url you are first redirected before the download starts.
How can I get this working?
I was able to solve it myself. When the original request is redirected the temporary file gets deleted too. So in the
request:willRedirectToURL:you simply have to set the path again, and now its working like a charm 🙂