Browse Source

fix(files): dav owner and mime types

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
pull/43318/head
John Molakvoæ 2 years ago
committed by nextcloud-command
parent
commit
77f307bafd
  1. 9
      apps/files/src/services/Files.ts
  2. 4
      dist/files-init.js
  3. 2
      dist/files-init.js.map
  4. 4
      dist/systemtags-init.js
  5. 2
      dist/systemtags-init.js.map

9
apps/files/src/services/Files.ts

@ -40,9 +40,14 @@ interface ResponseProps extends DAVResultResponseProps {
}
export const resultToNode = function(node: FileStat): File | Folder {
const userId = getCurrentUser()?.uid
if (!userId) {
throw new Error('No user id found')
}
const props = node.props as ResponseProps
const permissions = davParsePermissions(props?.permissions)
const owner = (props['owner-id'] || getCurrentUser()?.uid) as string
const owner = (props['owner-id'] || userId).toString()
const source = generateRemoteUrl('dav' + rootPath + node.filename)
const id = props?.fileid < 0
@ -53,7 +58,7 @@ export const resultToNode = function(node: FileStat): File | Folder {
id,
source,
mtime: new Date(node.lastmod),
mime: node.mime as string,
mime: node.mime || 'application/octet-stream',
size: props?.size as number || 0,
permissions,
owner,

4
dist/files-init.js
File diff suppressed because it is too large
View File

2
dist/files-init.js.map
File diff suppressed because it is too large
View File

4
dist/systemtags-init.js
File diff suppressed because it is too large
View File

2
dist/systemtags-init.js.map
File diff suppressed because it is too large
View File

Loading…
Cancel
Save