ready to test

Testing

Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
2026-06-22 10:06:58 +08:00
parent bf48c95467
commit 439bb33f77
189 changed files with 17559 additions and 686 deletions
+7 -6
View File
@@ -97,21 +97,22 @@ async function uploadFile({ buffer, originalname, mimetype, ownerType = "" }) {
contentType: mimetype,
});
const contentLength = await new Promise((resolve, reject) => {
form.getLength((err, length) => (err ? reject(err) : resolve(length)));
});
const data = await chibiRequest("/api/upload", {
method: "POST",
headers: {
...baseHeaders(),
...form.getHeaders(), // ← axios needs these
...form.getHeaders(),
"Content-Length": contentLength,
...(albumUuid ? { albumuuid: albumUuid } : {}),
},
data: form,
});
return {
uuid: data.uuid,
url: data.url,
name: data.name,
};
return { uuid: data.uuid, url: data.url, name: data.name };
}
/**