Change the name of the downloaded file using Alamofire

Asked

Viewed 25 times

1

I’m developing an iOS app where I update downloading the JSON file with the new data, this file generated by PHP

let destination = DownloadRequest.suggestedDownloadDestination(for: .documentDirectory)

Alamofire.download(MINHA_URL.PHP, to: destination).response { response in
     print(response)
}

It is downloading the file with the name of the PHP file (MINHA_URL.PHP), as I do to rename this file to "test.json"?

  • http://stackoverflow.com/questions/36785555/setting-alamofire-custom-destination-file-name-instead-of-using-suggesteddownloa

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.