timestee / dart-webdav Goto Github PK
View Code? Open in Web Editor NEWA Easy WebDAV Client in Dart
Home Page: https://github.com/timestee/dart-webdav
License: The Unlicense
A Easy WebDAV Client in Dart
Home Page: https://github.com/timestee/dart-webdav
License: The Unlicense
Can you update the package on pub.dev soon?
If you want to prevent overwriting files that have been updated since the last time the file was retrieved we can use etags and the If-Match
header. But to do that the upload method should pass on an optional Map of headers to the _send method (which can already does the right thing).
Would be nice if it supported both digest and basic authentication.
Hello,
i want to use your webdav client in my flutter app. I implemented it the following way:
Client client = Client("webdav.webdavserver.com", "user.name", "password", "",
port: 8080, protocol: "https");
client.ls("/").then((list) {
print(list);
});
The logs say the following:
I/flutter ( 6760): [wevdav] http send with method:PROPFIND path: url:https://webdav.webdavserver.com:8080//
My question is, if i am doing something wrong while using the library or is that a bug (intended behavior)?
Hauke
can someone explain me how I can upload local image ? client.uploadFile(..) or client.upload(..) throws exception :-/
Say there's a resource foo/bar.txt
and it is only a line or two of CR-delimited text. Can a simple Flutter+Dart app show that being GET from the server, then PUT back to the same server after editing?
That's different to a download/upload scenario :)
I wanted to maintain a dart webdav package, but found that the name was already used. Since you no longer intend to maintain this package, I would like to be able to transfer ownership to me in pub. Thank you so much!
I'm new to Dart and Flutter, can you please add an /examples folder containing some sample code for creating an Client object and calling some of the provided methods?
class _WebDavPageState extends State<WebDavPage> {
final Client webDav = Client(
'dav.jianguoyun.com/dav/',
'[email protected]',
'ag5hb2k87nabgm72',
'/',
protocol: 'https'
);
@override
Widget build(BuildContext context) {
return Container(
child: Center(
child: RaisedButton(
child: Text('Get File'),
onPressed: () async {
await webDav.ls("/").then((value) {
print('value is $value');
});
},
),
),
);
}
}
控制台输出:
I/flutter ( 3865): [wevdav] http send with method:PROPFIND path:/ url:https://dav.jianguoyun.com/dav/iviki
I/flutter ( 3865): value is []
Lines 29 to 49 in 1ff572a
parser the XML response directly rather than using xmltojson
.
使用这个库简单测试功能报出异常:
2019-10-13 13:06:16.493 27695-27713/? I/flutter: [wevdav] http send with method:PROPFIND path:/ url:http://192.168.0.2:41651/
2019-10-13 13:06:16.585 27695-27713/? E/flutter: [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: Bad state: No element
#0 Iterable.get:single (dart:core/iterable.dart:552)
#1 treeFromWevDavXml.. (package:webdav/src/file.dart:65)
#2 Iterable.forEach (dart:core/iterable.dart:277)
#3 treeFromWevDavXml. (package:webdav/src/file.dart:61)
#4 Iterable.forEach (dart:core/iterable.dart:277)
#5 treeFromWevDavXml (package:webdav/src/file.dart:55)
#6 Client.ls (package:webdav/src/client.dart:205)
when i upload file to cloud, I want to know when it is completed(Success or failure )
uploadFile return Future , when i use it , it's return null , Is this a sign of completion?
Client webDavClient = Client(_address, _username, _password, '/', protocol: 'https');
Future<dynamic> result = await webDavClient.uploadFile(localPath, 'somePath/' + 'myFile.db');
print('result is $x');
this is message : result is null
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.