|
|
@@ -275,8 +275,8 @@ extension DownloadRequest {
|
|
|
/// - returns: The request.
|
|
|
@discardableResult
|
|
|
public func validate<S: Sequence>(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String {
|
|
|
- return validate { _, response, temporaryURL, destinationURL in
|
|
|
- let fileURL = self.downloadDelegate.destination != nil ? destinationURL : temporaryURL
|
|
|
+ return validate { _, response, _, _ in
|
|
|
+ let fileURL = self.downloadDelegate.fileURL
|
|
|
|
|
|
guard let validFileURL = fileURL else {
|
|
|
return .failure(AFError.responseValidationFailed(reason: .dataFileNil))
|