fix: post images with as correct arraybuffer to marka

This commit is contained in:
Max Richter
2025-10-31 18:12:24 +01:00
parent ab9c0f96e0
commit d7037e1ca1
2 changed files with 2 additions and 3 deletions

View File

@@ -17,9 +17,9 @@ export async function createResource(
path: string,
content: string | object | ArrayBuffer,
) {
const isJson = typeof content === "object";
const isJson = typeof content === "object" &&
!(content instanceof ArrayBuffer);
const fetchUrl = `${url}/${path}`;
console.log("Creating resource", { fetchUrl, content, isJson });
const response = await fetch(fetchUrl, {
method: "POST",
headers: {