Skip to content

Commit

Permalink
fix(FilePicker): Request oc:size property for showing the file size
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux committed Aug 15, 2023
1 parent 0fd82df commit faa9470
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/usables/dav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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<FileStat[]>
const results = await client.getDirectoryContents(`${davRootPath}${currentPath.value}`, {
details: true,
data: davGetDefaultPropfind(),
}) as ResponseDataDetailed<FileStat[]>
files.value = results.data.map((r) => davResultToNode(r))
}

Expand Down

0 comments on commit faa9470

Please sign in to comment.