fix: upload image error

This commit is contained in:
Hk-Gosuto
2023-12-26 12:41:39 +08:00
parent 24de1bb77a
commit e60c0f009b
2 changed files with 9 additions and 6 deletions

View File

@@ -4,7 +4,7 @@ export class FileApi {
async upload(file: any): Promise<void> {
const formData = new FormData();
formData.append("file", file);
var headers = getHeaders();
var headers = getHeaders(true);
var res = await fetch("/api/file/upload", {
method: "POST",
body: formData,