Auto-migrate old drawing blocks on startup

This commit is contained in:
MassiveBox 2025-04-05 21:58:19 +02:00
parent 4555ec275f
commit d8cc4f8caf
Signed by: massivebox
GPG key ID: 9B74D3A59181947D
3 changed files with 54 additions and 0 deletions

View file

@ -11,8 +11,10 @@ function toFile(title: string, content: string, mimeType: string){
export async function uploadAsset(fileID: string, mimeType: string, content: string) {
const file = toFile(fileID + ".svg", content, mimeType);
console.log(1, file)
let r = await upload('/' + ASSETS_PATH, [file]);
console.log(2, r)
if(r.errFiles) {
throw new Error("Failed to upload file");
}