Added upload image readme

This commit is contained in:
chris
2022-07-23 09:45:34 +08:00
parent 26a326bb0d
commit d845dc7945
4 changed files with 8 additions and 3 deletions

1
.gitignore vendored
View File

@@ -20,3 +20,4 @@ data.json
# Exclude macOS Finder (System Explorer) View States
.DS_Store
.history

View File

@@ -86,6 +86,10 @@ Notion ID是你想分享文件的页面ID。
如果你不写它notion将分享到默认的链接https://www.notion.so/myworkspace/a8aec43384f447ed84390访问这个页面将重定向到你的网站页面。
如果你写了Notion ID它将分享到页面链接如https://your_user_name.notion.site/myworkspace/a8aec43384f447ed84390。不需要重定向网址。
## 同步图片
使用 [Obsidian Image Auto Upload Plugin](https://github.com/renmu123/obsidian-image-auto-upload-plugin) 插件,配置你自己的 cos 或者 oss将图片存储到你自己的云存储然后在 obsidian 中使用图片链接即可。该插件会自动帮你上传图片,并替换成链接。
# 请我喝杯咖啡
[顿顿饭](https://dun.mianbaoduo.com/@easy)

View File

@@ -100,6 +100,9 @@ if you write the Notion ID, it will share to the page link like:
https://your_user_name.notion.site/myworkspace/a8aec43384f447ed84390.
The visiter don't need to redirect url.
## Sync image to Notion
To sync images to your oss or cos bucket, use the [Obsidian Image Auto Upload Plugin](https://github.com/renmu123/obsidian-image-auto-upload-plugin).
# Buy me a cup of coffee.

View File

@@ -125,9 +125,6 @@ export class Upload2Notion {
// if __content have start \n remove it
const __content_remove_n = __content.replace(/^\n/, '')
const content = '---\n' +yamlhead_remove_n +'\n---\n' + __content_remove_n;
// const fullPath = this.getFilePath(nowFile);
//write content fo file
// fs.writeFileSync(fullPath, content);
try {
await nowFile.vault.modify(nowFile, content)
} catch (error) {