Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/talk/renderer/Viewer/viewer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import type { FileStat } from 'webdav'

import { davGetClient, davRemoteURL, davRootPath } from '@nextcloud/files'
import { defaultRemoteURL, defaultRootPath, getClient } from '@nextcloud/files/dav'

export async function fetchFileContent(filename: string, format: 'text'): Promise<string>
export async function fetchFileContent(filename: string, format: 'binary'): Promise<Blob>
Expand All @@ -16,7 +16,7 @@ export async function fetchFileContent(filename: string, format: 'binary'): Prom
* @param format - Format of the file content to be returned. 'binary' is returned as Blob
*/
export async function fetchFileContent(filename: string, format: 'text' | 'binary'): Promise<string | Blob> {
const webDavClient = davGetClient(davRemoteURL + davRootPath)
const webDavClient = getClient(defaultRemoteURL + defaultRootPath)

if (format === 'text') {
// Get the text file content
Expand Down
4 changes: 2 additions & 2 deletions src/talk/renderer/Viewer/viewer.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import { davRemoteURL, davRootPath } from '@nextcloud/files'
import { defaultRemoteURL, defaultRootPath } from '@nextcloud/files/dav'
import { generateUrl } from '@nextcloud/router'

/**
Expand All @@ -13,7 +13,7 @@ import { generateUrl } from '@nextcloud/router'
* @return Full path to the file, e.g. 'https://nextcloud.ltd/remote.php/dav/files/username/Talk/file.txt'
*/
export function generateUserFileDavUrl(filename: string): string {
return davRemoteURL + davRootPath + filename
return defaultRemoteURL + defaultRootPath + filename
}

/**
Expand Down