Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

音频录音下载出错 #43

Closed
dalehqb opened this issue Jun 6, 2018 · 1 comment
Closed

音频录音下载出错 #43

dalehqb opened this issue Jun 6, 2018 · 1 comment

Comments

@dalehqb
Copy link

dalehqb commented Jun 6, 2018

‼️‼️‼️ 2018-06-06 13:56:19.760 [Error] [main] [AudioPlayManager.swift:176] downloadAudio > Failed with error: responseSerializationFailed(Alamofire.AFError.ResponseSerializationFailureReason.inputFileReadFailed(file:///private/var/mobile/Containers/Data/Application/E7830B0F-4BD0-44C0-AC2C-B6B45B4F667C/tmp/CFNetworkDownload_m5q8qZ.tmp)) ‼️‼️‼️

@dalehqb
Copy link
Author

dalehqb commented Jun 6, 2018

已经可以正常下载了,估计是最新版本的Alamofire需要的参数不同:
let destination: DownloadRequest.DownloadFileDestination = { _, response in
//两个参数表示如果有同名文件则会覆盖,如果路径中文件夹不存在则会自动创建
return (filePath, [.removePreviousFile, .createIntermediateDirectories])
}

@dalehqb dalehqb closed this as completed Jun 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant