diff --git a/src/components/post-modal/index.tsx b/src/components/post-modal/index.tsx index e6e7e0225..44c682c23 100644 --- a/src/components/post-modal/index.tsx +++ b/src/components/post-modal/index.tsx @@ -81,8 +81,8 @@ export default function PostModal({ const content = getValues().content; const position = textAreaRef.current?.getCaretPosition(); if (position !== undefined) { - setValue("content", content.slice(0, position) + imageUrl + content.slice(position)); - } else setValue("content", content + imageUrl); + setValue("content", content.slice(0, position) + imageUrl + " " + content.slice(position)); + } else setValue("content", content + imageUrl + " "); } catch (e) { if (e instanceof Error) toast({ description: e.message, status: "error" }); } diff --git a/src/helpers/nostr-build.ts b/src/helpers/nostr-build.ts index c116cf070..f2c8e9f3d 100644 --- a/src/helpers/nostr-build.ts +++ b/src/helpers/nostr-build.ts @@ -42,7 +42,7 @@ export async function nostrBuildUploadImage(image: File, sign?: (draft: DraftNos const headers: HeadersInit = {}; if (sign) { // @ts-ignore - const token = await nip98.getToken(url, "post", sign, true); + const token = await nip98.getToken(url, "POST", sign, true); headers.Authorization = token; }