fix: drives

This commit is contained in:
Shivering Ocelot committed 2026-10-14 02:02:31 -05:00
1 parent 0d79b1f706
commit ea938a1248
3 files changed
+20 -16

No files matched your search

+4 -2
View File
@@ -379,6 +379,8 @@ export function invalidateCache({ chats=false, agents=false } = {}) {
// Drive endpoints are plain HTTP routes instead of WebSocket actions,
// so they authenticate with the bearer token in the Authorization header.
// TODO: Next time these functions need updating, move them directly to views/Drives.vue
export function getDrives () {
return webFetch('/files');
}
@@ -387,10 +389,10 @@ export function getDriveFiles (driveName) {
return webFetch(`/files/${driveName}`);
}
export function uploadDriveFile (driveName, file) {
export function uploadDriveFile (driveName, file, path) {
const body = new FormData();
body.append('file', file, file.name);
return webFetch(`/files/${driveName}`, {
return webFetch(`/files/${driveName}/${path}`, {
method: 'POST',
body,
});