Updated nextcloud neon api to latest
This commit is contained in:
@ -13,7 +13,7 @@ class ListFiles extends WebdavApi<ListFilesParams> {
|
||||
|
||||
@override
|
||||
Future<ListFilesResponse> run() async {
|
||||
List<WebDavFile> davFiles = (await (await WebdavApi.webdav).ls(params.path)).toWebDavFiles((await WebdavApi.webdav));
|
||||
List<WebDavFile> davFiles = (await (await WebdavApi.webdav).propfind(params.path)).toWebDavFiles();
|
||||
davFiles.removeWhere((element) => element.path == "/${params.path}/" || element.path == "/"); // somehow the current working folder is also listed, it is filtered here.
|
||||
Set<CacheableFile> files = davFiles.map((e) => CacheableFile.fromDavFile(e)).toSet();
|
||||
|
||||
|
@ -18,7 +18,7 @@ abstract class WebdavApi<T> extends ApiRequest {
|
||||
static Future<String> webdavConnectString = buildWebdavConnectString();
|
||||
|
||||
static Future<WebDavClient> establishWebdavConnection() async {
|
||||
return NextcloudClient("https://${EndpointData().nextcloud().full()}", username: AccountData().getUsername(), password: AccountData().getPassword(), loginName: AccountData().getUsername()).webdav;
|
||||
return NextcloudClient("https://${EndpointData().nextcloud().full()}", password: AccountData().getPassword(), loginName: AccountData().getUsername()).webdav;
|
||||
}
|
||||
|
||||
static Future<String> buildWebdavConnectString() async {
|
||||
|
Reference in New Issue
Block a user