From faa9470e836e3dc751f000da47bf6140c705bf8c Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 15 Aug 2023 17:59:09 +0200 Subject: [PATCH] fix(FilePicker): Request `oc:size` property for showing the file size Signed-off-by: Ferdinand Thiessen --- lib/usables/dav.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/usables/dav.ts b/lib/usables/dav.ts index d367836e..6fb70459 100644 --- a/lib/usables/dav.ts +++ b/lib/usables/dav.ts @@ -23,7 +23,7 @@ import type { Node } from '@nextcloud/files' import type { ComputedRef, Ref } from 'vue' import type { FileStat, ResponseDataDetailed, WebDAVClient } from 'webdav' -import { davGetClient, davGetFavoritesReport, davGetRecentSearch, davResultToNode, davRootPath } from '@nextcloud/files' +import { davGetClient, davGetDefaultPropfind, davGetFavoritesReport, davGetRecentSearch, davResultToNode, davRootPath } from '@nextcloud/files' import { generateRemoteUrl } from '@nextcloud/router' import { ref, watch } from 'vue' @@ -90,7 +90,10 @@ export const useDAVFiles = function(currentView: Ref<'files'|'recent'|'favorites files.value = results.data.map((r) => davResultToNode(r)) } else { - const results = await client.getDirectoryContents(`${davRootPath}${currentPath.value}`, { details: true }) as ResponseDataDetailed + const results = await client.getDirectoryContents(`${davRootPath}${currentPath.value}`, { + details: true, + data: davGetDefaultPropfind(), + }) as ResponseDataDetailed files.value = results.data.map((r) => davResultToNode(r)) }