Skip to content

Commit 2b90f34

Browse files
committed
fix: Fix 'no-cors' error for marketplace downloaded plugin.
1 parent 9561150 commit 2b90f34

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "logseq-plugin-image-uploader",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"main": "dist/index.html",
55
"scripts": {
66
"dev": "vite",

Diff for: src/main.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { BlockEntity, PageEntity } from '@logseq/libs/dist/LSPlugin';
44
async function uploadImage(url: string): Promise<string> {
55
return url = await fetch("http://localhost:36677/upload", {
66
method: "POST",
7+
mode: "no-cors",
78
body: JSON.stringify({ list: [url]})
89
})
910
.then(res => res.json())

0 commit comments

Comments
 (0)