checkpoint don't deploy

This commit is contained in:
AdisakKanthawilang 2025-01-10 13:56:46 +07:00
parent a20cdef11e
commit 11015df0a8
2 changed files with 36 additions and 18 deletions

View file

@ -143,7 +143,7 @@ export async function listFile(path: string[]) {
return (await list("file", path)) as StorageFile[] | boolean;
}
export async function updateFile(path: string[], file: string, metadata: FileProps) {
export async function updateFile(path: string[], file: string, metadata: FileProps, destPath?: string[], destFile?: string) {
const res = await fetch(`${STORAGE_URL}/storage/file`, {
method: "PUT",
headers: {
@ -152,6 +152,7 @@ export async function updateFile(path: string[], file: string, metadata: FilePro
},
body: JSON.stringify({
from: { path, file },
to: destPath && destFile ? { path: destPath, file: destFile,} : undefined,
...metadata,
upload: false,
}),