fix: post images with as correct arraybuffer to marka
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user