Open m42e opened 9 years ago
When trying the following code, the callback is executed immediately and not only after the whole file is downloaded. Is this intended behaviour?
webdav.download(remote_path, local_path, unzip(local_path))
The callback is intended to give you an update while downloading so you can get the size of the downloaded chunk. So it is for progress, rather than completion. Just call unzip after the download call.
webdav.download(remote_path, local_path)
unzip(local_path)
Thanks. Somehow I thought the download was threaded and working in the background (must have mixed that up with another webdav client I was testing).
Added a optional callback for downloading. There is one parameter in the callback containing the size of the recently loaded chunk. The download initiator has to take care of the file size itself.