Skip to content

Commit

Permalink
fix: Fix 'no-cors' error for marketplace downloaded plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjaychen1e committed Jan 6, 2022
1 parent 9561150 commit 2b90f34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "logseq-plugin-image-uploader",
"version": "0.0.1",
"version": "0.0.2",
"main": "dist/index.html",
"scripts": {
"dev": "vite",
Expand Down
1 change: 1 addition & 0 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { BlockEntity, PageEntity } from '@logseq/libs/dist/LSPlugin';
async function uploadImage(url: string): Promise<string> {
return url = await fetch("http://localhost:36677/upload", {
method: "POST",
mode: "no-cors",
body: JSON.stringify({ list: [url]})
})
.then(res => res.json())
Expand Down

0 comments on commit 2b90f34

Please sign in to comment.