Closed androidrivne closed 8 years ago
Hm, why don't you like the default behaviour: it downloads file into tmp directory and you move into you destination folder by yourself. There can be a problem with custom 'destination' path: who should delete file if app crashes during downloading? If you use default tmp directory it's gonna be cleaned automatically.
It's good idea to clean files from tmp folder, but what about time needed to move files to another directory (can be many files with folders) ?
Hm, I don't you gonna have significant performance issues with file moving. I copied the behaviour for NSURLSession, which puts downloaded file into 'tmp' directory. https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLSessionDownloadTask_class/index.html#//apple_ref/occ/cl/NSURLSessionDownloadTask
I thought one more time, but I would like to keep the existing behaviour. So I'm gonna close your PR, but thanks in any case :)
Ok :) How about "Fixed mapFTPResources key type" and "Fixed resource size fetching" is that fixes ok ?
Also we are facing problem of downloading large zip file (50mb - 200mb) - it just stops download (method @objc func stream(aStream: NSStream, handleEvent eventCode: NSStreamEvent) doesn't call) but when we make http request (load url in webview) it resumes downloading
Thank you for reporting bugs. I have fixed 'resource size fetching' and file downloading. I'm sorry, I have fixed the problem with fetching size while debugging downloading. You may try latest commit on master branch.
Let me know if something is still wrong.
Cool, it works, thanks
Fixed mapFTPResources key type, added download file destination param Fixed resource size fetching