diff --git a/app/api/nextcloud/files/route.ts b/app/api/nextcloud/files/route.ts index 9e4c2dff..181c4218 100644 --- a/app/api/nextcloud/files/route.ts +++ b/app/api/nextcloud/files/route.ts @@ -47,12 +47,12 @@ export async function GET(request: Request) { const client = createClient({ username: credentials.username, password: credentials.password, - baseURL: `${normalizedBaseURL}/remote.php/dav/files/${credentials.username}/Private`, + baseURL: normalizedBaseURL, authType: 'basic', }); - // Construct the folder path without leading slash - const folderPath = folder; + // Construct the folder path + const folderPath = `remote.php/dav/files/${credentials.username}/Private/${folder}`; console.log('Full folder path:', folderPath); try {