Fix file download URLs to match backend wildcard route parameter instead of query string
All checks were successful
Automated Container Build / build-and-push (push) Successful in 40s
All checks were successful
Automated Container Build / build-and-push (push) Successful in 40s
This commit is contained in:
parent
8375406f9b
commit
382d78d492
2 changed files with 2 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ export default function OnlyOfficeEditor({ file, type, onClose }: OnlyOfficeEdit
|
||||||
const API_BASE = getApiBase();
|
const API_BASE = getApiBase();
|
||||||
|
|
||||||
// Use the public API_BASE which correctly routes through the Nginx proxy to the Next.js frontend
|
// Use the public API_BASE which correctly routes through the Nginx proxy to the Next.js frontend
|
||||||
const fileUrl = `${API_BASE}/files/download/?path=${encodeURIComponent(file.path)}&token=${downloadToken}`;
|
const fileUrl = `${API_BASE}/files/download/${encodeURIComponent(file.path)}?token=${downloadToken}`;
|
||||||
const callbackUrl = `${API_BASE}/public/onlyoffice/callback?path=${encodeURIComponent(file.path)}&token=${downloadToken}`;
|
const callbackUrl = `${API_BASE}/public/onlyoffice/callback?path=${encodeURIComponent(file.path)}&token=${downloadToken}`;
|
||||||
|
|
||||||
const baseConfig: any = {
|
const baseConfig: any = {
|
||||||
|
|
|
||||||
|
|
@ -295,7 +295,7 @@ class ApiClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
getDownloadUrl(path: string, token: string) {
|
getDownloadUrl(path: string, token: string) {
|
||||||
return `${API_BASE}/api/files/download/?path=${encodeURIComponent(path)}&token=${token}`;
|
return `${API_BASE}/api/files/download/${encodeURIComponent(path)}?token=${token}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
getDownloadFolderUrl(path: string, token: string) {
|
getDownloadFolderUrl(path: string, token: string) {
|
||||||
|
|
|
||||||
Reference in a new issue