2
votes

As recommended in ASIHTTPRequest documentation, I use "setDownloadDestinationPath" to download images from remote server. In some situation the server answer an Error 404, file not found. The Error 404 page is then donwloaded in local file.png for example...

What is the recommended way to avoid such behaviour ? How to manage to not create image if the file does not exist on server ?

Thanks for your help !

Solved (detail bellow)

The magick key word is [request responseStatusCode] --> A valid OK HTTP response code is 200. For other codes I just delete (using NSFileManager) the created file.

Hope it can help others

kheraud

1

1 Answers

0
votes

The magick key word is [request responseStatusCode] --> A valid OK HTTP response code is 200. For other codes I just delete (using NSFileManager) the created file.

Hope it can help others

kheraud