Typora+PicGo-Core+Alibaba Cloud OOS realizes image upload

Typora+PicGo-Core+Alibaba Cloud OOS realizes image upload

1. Display

After the function is implemented, paste the picture to typora to complete the automatic upload to Alibaba Cloud OOS.

image-20230221134552881

Open the Alibaba Cloud OOS console to view:

image-20230221134811147

In this way, when the md note is sent to other devices, the picture can still be displayed when there is a network, which saves the need to migrate the picture separately when migrating the note, which is very convenient.

2. Attention!

Alibaba Cloud OOS object storage service charge! ! ! But the cost is not high.

3. Open Alibaba Cloud OOS

First, enter the official website of Alibaba Cloud, Product->Popular Products/Storage->Object Storage OOS;

image-20230221135413589

Click to open immediately, and after logging in, follow the prompts to open successfully and use the service;

image-20230221135526879

Enter the OOS management console: Bucket List -> Create Bucket;

image-20230221140244272

Fill in according to the above content in order: Bucket is equivalent to a bucket, the bucket where files are placed, and give the bucket a name; choose the place closest to you for the region ; the resource group to which you belong is the default; storage type : standard, local redundancy Storage; read and write permissions need to select public read, otherwise they will not be able to access in the future; others can not be selected, click OK to complete the creation.

image-20230221140601860

Move the mouse to the avatar in the upper right corner, click AccessKey, click Continue to use, click Create AccessKey, and remember the generated id and password, which will be filled in the configuration file later.

image-20230221141855456

4. Fees

Pay-as-you-go: generally divided into storage fees, traffic fees, request fees, and data processing fees

image-20230221144830707 image-20230221144941478

5. Install PicGo-Core

Enter Typora, File->Preferences->Image, set as shown in the figure, click download or update;

image-20230221141200425

After the download is complete, click to open the configuration file and fill in the following configuration:

{
    
    
  "picBed": {
    
    
    "uploader": "aliyun",// 指定当前默认的图床为 aliyun
    "aliyun": {
    
    
      "accessKeyId": "",//创建用户时生成的accessKeyId,替换为自己的
      "accessKeySecret": "",//创建用户时生成的,替换为自己的
      "bucket": "", // 存储空间名,创建的Bucket的名字
      "area": "oss-cn-chengdu", // 存储区域代号,通过bucket概览查看,替换为自己的
      "path": "img/", // 自定义存储路径,一定要以"/"结尾!
      "customUrl": "", // 自定义域名,注意要加 http://或者 https://
      "options": "" // 针对图片的一些后缀处理参数 PicGo 2.2.0+ PicGo-Core 1.4.0+
    }
  },
  "picgoPlugins": {
    
    } //插件
}

6. Test

Go back to setting up the image upload service, click Verify image upload;

image-20230221142842003

show success;

image-20230221142953921

Check in OOS, you can see that the typora test picture has been uploaded to Alibaba Cloud OOS.

image-20230221143136076

7. Date plugin

This plug-in is for uploading pictures to a folder named by date for easy management, for example: the picture shows a picture uploaded on February 21, 2023;

image-20230221143256597

Installation: Enter the picgo installation directory, usually C:\Users\23206\AppData\Roaming\Typora\picgo\win64under the: directory;

**Note:**1. 23206 in the document is the local user name

​ 2. If the AppData file cannot be found, you need to open the hidden file display, the method is as follows

Take win10 as an example: as shown in the picture, click to view and check the hidden items;

image-20230221143635356

After entering the above directory: enter cmd in the position in the figure, and press Enter

image-20230221143821824

Input:picgo.exe install super-prefix Enter, it shows that the installation is successful

**Note:** This plug-in installation requires a node environment

image-20230221144043134

Then open the configuration file just now: add below: save

{
    
    
  "picBed": {
    
    
    "uploader": "aliyun",// 指定当前默认的图床为 aliyun
    "aliyun": {
    
    
      "accessKeyId": "",//创建用户时生成的accessKeyId,替换为自己的
      "accessKeySecret": "",//创建用户时生成的,替换为自己的
      "bucket": "", // 存储空间名,创建的Bucket的名字
      "area": "oss-cn-chengdu", // 存储区域代号,通过bucket概览查看,替换为自己的
      "path": "img/", // 自定义存储路径,一定要以"/"结尾!
      "customUrl": "", // 自定义域名,注意要加 http://或者 https://
      "options": "" // 针对图片的一些后缀处理参数 PicGo 2.2.0+ PicGo-Core 1.4.0+
    }
  },
"picgoPlugins": {
    
    
    "picgo-plugin-super-prefix": true
  }, // 为插件预留
  "picgo-plugin-super-prefix": {
    
    
    "prefixFormat": "YYYY/MM/DD/HH:mm:ss-", //给文件名增加前缀
    "fileFormat": "" //原文件名不变
  } //super-prefix插件配置

Finish!

Guess you like

Origin blog.csdn.net/dedede001/article/details/129142730