This commit is contained in:
parent
d8cc4f8caf
commit
0bc89f4a72
7 changed files with 48 additions and 22 deletions
|
@ -11,10 +11,8 @@ 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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue