MQZHot / DaisyNet

Alamofire与Cache封装 , 更容易存储请求数据
MIT License
379 stars 65 forks source link

Option to use a custom file name for downloaded file. #5

Closed talk2cerlin closed 6 years ago

talk2cerlin commented 6 years ago

How do i change the file name in which the downloaded file will be written?

as of now i can see you are using response.suggestedFilename ?? "" for name. It would be great if that can be overridden manually

MQZHot commented 6 years ago

Thanks for attention

There is no open api to modify the file name now, You can expose the fileName by modifying the method below

private func downloadDestination(fileName: String) -> DownloadRequest.DownloadFileDestination