WebDav file creation error
I use writeContents function for document creation. But my progress has next values:
modify file: file.pdf: -1.3031e+06 completed. modify file: file.pdf: -5.3031e+06 completed. modify file: file.pdf: -7.3031e+06 completed.
And after that I get The request timed out error message Maybe you know about this issue?
@EgorVeremeychik See my comment #112. Until new release, I suggest you use the version 38fb3fc of 07/26/2018.
I have the same issue. This code: let urlCredential = URLCredential(user: username, password: password, persistence: .permanent) if let webDAVFileProvider = WebDAVFileProvider(baseURL: server, credential: urlCredential) { // webDAVFileProvider.isReachable() {success,error in print (error?.localizedDescription)} webDAVFileProvider.writeContents(path: path, contents: contents, atomically: true, overwrite: true,completionHandler: completionHandler) } else { print ("Error: createFile") }
creates these errors: 2018-09-26 17:01:50.208304+0200 Photo2[14540:1154416] Task <5E9BD51C-A77E-4F8A-AAA7-B559F4DF5B80>.<1> load failed with error Error Domain=NSURLErrorDomain Code=-999 "Abgebrochen" UserInfo={NSErrorFailingURLStringKey=https://www.xxxxx.net:5006/webdav/Test123.tmp, NSErrorFailingURLKey=https://www.xxxxx.net:5006/webdav/Test123.tmp, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalUploadTask <5E9BD51C-A77E-4F8A-AAA7-B559F4DF5B80>.<1>" ), _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask <5E9BD51C-A77E-4F8A-AAA7-B559F4DF5B80>.<1>, NSLocalizedDescription=Abgebrochen} [-999] 2018-09-26 17:01:50.209489+0200 Photo2[14540:1154411] Task <5E9BD51C-A77E-4F8A-AAA7-B559F4DF5B80>.<1> finished with error - code: -999 2018-09-26 17:01:50.209993+0200 Photo2[14540:1154410] Task <5E9BD51C-A77E-4F8A-AAA7-B559F4DF5B80>.<1> HTTP load failed (error code: -999 [1:89])
The file is not written.
However, if I do execute the line webDAVFileProvider.isReachable() {success,error in print (error?.localizedDescription)}
then there is no error and the file is written correctly.
@mikemper Thank you!!! Yes, you are right! But I save my data to local file and use the copyItem function and it's work fine!) @CPiersigilli Thank you!!! I use the copyItem function from your example. But it also works for me in the latest version of the library.
I was getting a similar error where every time i tried writeContents() it would show negative numbers as the progress.
So I switched to 611366b and it is now working for me.
I'm using Swift 4, Xcode 10.1