You are setting the documents folder as destination path. You need to specify a file name inside the documents folder as download path like this to make it work:
[request setDownloadDestinationPath:[documentsDirectory stringByAppendingPathComponent:@"myfile.extension"]];
This saves the downloaded data in the file myfile.extension
inside the documents folder.
You should also set a temporary download path, otherwise the downloaded bytes get stored in the memory until the download is finished rather than in a file.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…