Typora picture upload

This article is based on:zhuanlan.zhihu.com/p/137426939

Thanks to bloggers for sharing

Quote:

I don’t know where you usually take notes. I am always in CSDNJava kind

To tell the truth, CSDN although the recent wind review is very bad, serious plagiarism! But I think it’s a great blog site for taking notes together…

  • I don’t have anything to say for plagiarism, I also often draw lessons from big guy’s blog, and then summed up as their own blog… Of course, it is very good to know a lot of them, so they will post the original link.. Show respect!
  • Behind want to build their own personal blog, you can also send some other articles in addition to Java also please pay attention to learn together! My domain name is wangsiming.xyz

For blog people, will certainly encounter a total of problems: how to store the pictures/resources in the document, I will generally send in Gitee pictures directly CSDN very convenient!

  • As time went by, I was worried about losing it suddenly, so I tried to write blog locally and saved it in CSDN. I met Typora
  • It’s good to use, sometimes the text in the web page copy can be directly with style paste! But pictures are a headache:Will be stored locally, directly copymarkdownThere will be problems!
  • Copy of the document because the image address is local back to change! Too tired..

So I’m going to useTypora upload pictures!

Introduction:

Say dry dry, on the Internet to find a whole child operation:

  • I use the environment: Typora + Ali cloud OSS storage

Typroa supports binding graph bed tool configuration, of course, can also be set in the local… Supported map bed tools are: Ali Cloud OSS seven Niu Cloud Github SMMS Bala Bala

  • Seven niuyun free but need to bind domain name ~
  • Githubsmms is free, but the network is slow ~…
  • Ali yuntu bed to money but not expensive ~10 dollars to pay up!The advantage is safe, easy to manage, you can see your picture resources at any time, but also can store other types of file information for easy management Figure bed is introduced

Implementation:

Buy Ali Cloud OSS

Ali cloud official login/registration will not be introduced!

  • Ali Cloud OSS is not only used as a map bed, many small companies also use it to do:Photo storage The watermark to make.
  • Ali Cloud has also done the right thingsdkOperations in various languages Demo~

Product – Storage – Object storage OSS Purchase and enable the service

Create a bucket

Click on theAn overview of the options

The button on the right creates a Bucket: a Bucket can be interpreted as a storage space. A storage space is a container that you use to store objects. All objects must belong to a storage space

  • You can set and modify storage space properties to control the region, access permission, and life cycle of the storage space. These properties directly affect all objects in the storage space

  • Therefore, you can flexibly create different storage Spaces to achieve different management functions

    Each user can have multiple storage Spaces

    The interior of the same storage space is flat, and there is no concept such as directory of file system. All objects belong to the corresponding storage space directly

    There is no limit to the number of objects in a storage space. The name of the storage space must be globally unique within the OSS scope and cannot be changed once created

  • Naming conventions

    The value can contain only lower-case letters, digits, and hyphens (-). It must start and end with a lower-case letter or digit, and be between 3 and 63 bytes in length

  • Set public read, or others can not access!

Ok, it’s time to configure Typroa after the purchase


Configuration Typroa

  • Make sure the typroa version is 0.9.86

    Help — About

  • Set bed Configuration: File — Preferences — Image:

    When inserting a picture:

    • Copy the image to./${}… Assets folder I am so set, each time insert images will create a total folder stored locally ~
    • Of course, you can choose according to your needs:To upload picturesInsert picture and upload

    Upload server Settings:

    • There is no
    • Pic-Go-Core(command line) Typroa has the PicGo tool built in and you just need to write configuration files!
    • PicGo (app)/Custom Command It should be downloading an app and going through the appUpload the image and return the image access link ~ Figure bed

Edit the configuration file:

Opening a Configuration file

  • Copy the following information to modify the correct configuration file
{ "picBed": { "uploader": "aliyun", "aliyun": { "accessKeyId": "", "accessKeySecret": "", "bucket": "/ / storage space name", "area" : "", / / storage area code" path ":" img /, / / custom storage paths: fill can casually, can understand is folder directory. You can change the file directory of pictures without writing an MD! "CustomUrl ": "", // Customize the domain name. Note that http:// or https:// "options" should be added: PicGo 2.2.0+ picgo-core 1.4.0+}}, "picgoPlugins": {}}Copy the code

AccessKeyId and accessKeySecret Bucket…

Testing:

Ok, upload complete!

Or manually upload!

Return picture network address:

<img SRC ="https://wsm540.oss-cn-beijing.aliyuncs.com/ tool/typoraimage-20211107205748815.png "Alt ="image-20211107205748815" style="zoom:80%;" />

\