Java

Typora 图片上传

2021-11-07  本文已影响0人  Java慈祥

Typora 图片上传

本文借鉴源于:https://zhuanlan.zhihu.com/p/137426939

感谢博主分享

引:

不知道你们平时都在哪里做笔记,本人都是在CSDN Java慈祥

说句实话,CSDN虽然最近风评很差,抄袭严重!但本人觉得作为一共记笔记的blog网站还是很好的...

对于写blog的人,一定都会遇到一共问题: 对于文档中的图片/资源都怎么存放, 本人一般会发在Gitee 图片就直接存在 CSDN 挺方便的!

于是直接使用 Typora上传图片!

介绍:

说干就干,在网上找了一整子操作:

Typroa 支持绑定图床工具配置, 当然也可以设置在本地... 支持的图床工具有: 阿里云OSS 七牛云 github smms 巴拉巴拉

实现:

购买阿里云OSS

阿里云官方 登录/注册就不介绍了!


产品——存储——对象存储OSS 购买开通服务

image-20211107205748815

创建bucket

点击 概述选项

右边按钮 创建Bucket(桶)Bucket可以理解为是存储空间。存储空间是您用于存储对象(Object)的容器所有的对象都必须隶属于某个存储空间

image-20211107212226126

ok, 购买完毕之后就是配置 Typroa了


配置Typroa

编辑配置文件:

打开配置文件

<pre class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded" spellcheck="false" lang="json" cid="n99" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px 0px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"> {
"picBed": {
"uploader": "aliyun",
"aliyun": {
"accessKeyId": "",
"accessKeySecret": "",
"bucket": "", // 存储空间名
"area": "", // 存储区域代号
"path": "img/", // 自定义存储路径: 随便填即可,可以理解是文件夹目录.没写一篇md 可以更改图片存放的文件目录!
"customUrl": "", // 自定义域名,注意要加 http://或者 https://
"options": "" // 针对图片的一些后缀处理参数 PicGo 2.2.0+ PicGo-Core 1.4.0+
}
},
"picgoPlugins": {}
}</pre>

获取: accessKeyIdaccessKeySecret bucket...

image-20211107234801425

测试:

ok, 上传完毕!

image-20211107235242139

或手动上传!

image-20211107235452015

返回图片 网络地址:

<img src="https://wsm540.oss-cn-beijing.aliyuncs.com/工具/Typoraimage-20211107205748815.png" alt="image-20211107205748815" style="zoom:80%;" />

上一篇 下一篇

猜你喜欢

热点阅读