diff --git a/package.json b/package.json index 5685ab4..b61d616 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "logseq-plugin-image-uploader", - "version": "0.0.1", + "version": "0.0.2", "main": "dist/index.html", "scripts": { "dev": "vite", diff --git a/src/main.tsx b/src/main.tsx index 2afcf19..811475f 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -4,6 +4,7 @@ import { BlockEntity, PageEntity } from '@logseq/libs/dist/LSPlugin'; async function uploadImage(url: string): Promise { return url = await fetch("http://localhost:36677/upload", { method: "POST", + mode: "no-cors", body: JSON.stringify({ list: [url]}) }) .then(res => res.json())