feat: sending images and receiving them is now working
This commit is contained in:
@@ -32,16 +32,15 @@ const sendImageResponseValidator = object({
|
||||
|
||||
export const sendImage = async (
|
||||
imageName: string,
|
||||
image: BlobPart,
|
||||
base64Image: string,
|
||||
): Promise<InferOutput<typeof sendImageResponseValidator>> => {
|
||||
const data = new Blob([image]);
|
||||
const request = getBaseRequest({
|
||||
path: `image/${imageName}`,
|
||||
body: data,
|
||||
body: base64Image,
|
||||
method: "POST",
|
||||
});
|
||||
|
||||
request.headers.set("Content-Type", "aplication/base64");
|
||||
request.headers.set("Content-Type", "application/base64");
|
||||
|
||||
const res = await fetch(request).then((res) => res.json());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user