fix: drives
This commit is contained in:
1 parent
0d79b1f706
commit
b74f7cd3d9
11 files changed
+598
-16
No files matched your search
@@ -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,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user