π use picgo cloudflare b2 with typora
tags
type
Post
summary
status
Published
slug
use-picgo-cloudflare-b2-with-typora
date
Apr 26, 2022
Overview
- Backblaze B2: Cloud Storage for images
- Cloudflare: CDN for images
- Picgo-core: uploading the images to Backblaze B2
CloudFlare
Follow this reddit post.
In Cloudflare, create DNS CNAME or ANAME record to your Backblaze bucket host (will be something like f***.backblazeb2.com). The record must be proxied by Cloudflare.Under Rules > Transform Rules in Cloudflare, add a new Rewrite URL rule.Upcoming requests match > Hostname equals your full sub/domainThen > Rewrite the path, using Dynamic, to concat("/file/<your-bucket-name>", http.request.uri.path)Requests to your sub/domain will be re-written transparently to append the bucket name and /file prefix to requests forwarded to Backblaze.
Picgo-core
Why Picgo-Core: Picgo GUI for apple silicon is still in Beta, and Typora supports Picgo-core to upload.
First, download the Picgo-Core following the github repo.
Then we need to install the Picgo s3 plugin for Backblaze B2:
picgo add s3
to install the s3 plugin
picgo use
, select s3 and path
picgo set uploader aws-s3
for configuration
Aside from the option of being punched in mosaics, the others can be in line with me.
Typora
If you set
picgo upload
in the βCommandβ options, you need to input the absolute path for picgo
.For example, use
which node
and which picgo
to get the path of node and picgo.Then type:
{node-path} {picgo-path} u
Although I only used
{picgo-path} u
...