Задание имени файла пользовательского назначения Alamofire вместо использования предложилDownloadDestination в Swift 3.0

Как написать следующий фрагмент в Swift 3.0? Следующий синтаксис в Swift 2

    Alamofire.download(.POST, invoice.url,parameters:params, destination: { (url, response) -> NSURL in

        let pathComponent = response.suggestedFilename

        let fileManager = NSFileManager.defaultManager()
        let directoryURL = fileManager.URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask)[0]
        let fileUrl = directoryURL.URLByAppendingPathComponent(pathComponent)
        return fileUrl
    })
    .progress { bytesRead, totalBytesRead, totalBytesExpectedToRead in
        print(totalBytesRead)
        dispatch_async(dispatch_get_main_queue()) {
            let progress = Double(totalBytesRead) / Double(totalBytesExpectedToRead)
            completionHandler(progress, nil)
        }
    }
    .responseString { response in
        print(response.result.error)
        completionHandler(nil, response.result.error)
    }

Ответы на вопрос(2)

Ваш ответ на вопрос