Fix: sidebar drive button resets to root, and use query parameter for downloads to bypass Next.js API rewrite bug with parenthesis in paths
All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m23s

This commit is contained in:
Elijah 2026-05-25 19:09:02 -07:00
parent 0bd42e5b47
commit d982ce66a8
3 changed files with 4 additions and 3 deletions

View file

@ -234,7 +234,7 @@ class ApiClient {
async deleteFile(path: string, permanent: boolean = false) {
const query = permanent ? `?permanent=true&path=${encodeURIComponent(path)}` : `?path=${encodeURIComponent(path)}`;
const res = await this.request(`/api/files/${encodeURIComponent(path)}${query}`, {
const res = await this.request(`/api/files/${query}`, {
method: 'DELETE',
});
return res.json();
@ -295,7 +295,7 @@ class ApiClient {
}
getDownloadUrl(path: string, token: string) {
return `${API_BASE}/api/files/download/${encodeURIComponent(path)}?token=${token}`;
return `${API_BASE}/api/files/download?path=${encodeURIComponent(path)}&token=${token}`;
}
getDownloadFolderUrl(path: string, token: string) {