download(_:decideDestinationWithSuggestedFilename:)
The delegate receives this message when download has determined a suggested filename for the downloaded file.
Declaration
optional func download(_ download: NSURLDownload, decideDestinationWithSuggestedFilename filename: String)Parameters
- download:
The URL download object sending the message.
- filename:
The suggested filename for the download.
Discussion
The suggested filename is either derived from the last path component of the URL and the MIME type or, if the download was encoded, from the encoding. If the delegate wishes to modify the path, it should send setDestination(_:allowOverwrite:) to download.
Special Considerations
The delegate will not receive this message if setDestination:allowOverwrite: has already been called for the download.