Picbed Migration: from Aliyun OSS to cloudflare R2
STEP1: Batch download my Pic-set From Aliyun OSS using ossutil64
??? failure annotate “Click Download button trigers stupid individual web download”
Goto the [bucket page](https://oss.console.aliyun.com/bucket/oss-cn-hangzhou/shaojiemike/object?path=img%2F) and download all pictures(1) in `img` directory.
- 1000 files about 350MB
??? example annotate “ossutil64”
1. 根据windows系统版本[下载ossutil安装包](https://www.alibabacloud.com/help/zh/oss/developer-reference/install-ossutil#4c30f1a48ce9y),解压使用,双击`ossutil.bat`跳出命令行窗口
2. config access authority(1) `ossutil64.exe config -e oss-cn-hangzhou.aliyuncs.com -i <accessKeyId> -k <accessKeySecret>`
3. 本地批量上传至OSS:`ossutil64.exe cp <本地目录> oss://<bucketName>[/<上传路径>/] -r`
4. OSS批量下载至本地:[^1] `ossutil64.exe cp oss://<bucketName>/[<上传路径>/] <本地目录> -r`,e.g, `ossutil64.exe cp oss://shaojiemike/img . -r`
- 创建RAM用户的AccessKey and
oss-cn-hangzhou
must be the location of bucket
STEP2: Setup R2
1. support 银联 and fill CVC(1) and 有效期(2)[^2]。Need to recharge 1 USD(US dollar)
1. 但是我没有自己的信用卡,申请了中行的一个校园数字信用卡(3), 中国银行APP申请然后APP激活,完全不需要去线下网点。
2. Click `Create a bucket` and named it `shaojiemike` and select loaction `APAC`
3. CLick `Settings` and `connect domain` to add `pic.shaojiemike.top`
4. Click `active access` in `R2.dev subdomain`
- The Card Verification Code, or CVC*, is an extra code printed on your debit or credit card. With most cards (Visa, MasterCard, bank cards, etc.) it is the final three digits of the number printed on the signature strip on the reverse of your card
- 信用卡有效期是指从信用卡发卡时间至停止使用的时间,有效期涉及用卡安全请勿随意透露,目前仅能通过信用卡正面的卡号下方查看。 有效期的格式是MM/YY,在信用卡正面下方四位数,前两位代表月份,后两位代表年份,如04/21,代表有效期到2021年4月30日。
- 数字信用卡没有实体卡,不用担心“薄薄”的一张卡片丢失被盗刷或者忘记密码,数字信用卡进一步提高了用户在消费使用时的安全性和便捷性。
STEP3: upload your Pic-Set to R2
And you can access pic through url like pic.shaojiemike.top/img/20220705171352.png
STEP4: Change the picture url in your markdown
Just global replace shaojiemike.oss-cn-hangzhou.aliyuncs.com/img
to pic.shaojiemike.top/img
STEP5: Setting picgo
- R2 Clike
Manage R2 API Tokens
[^2] - Picgo install
S3
plug-in and setting like[^2]{ align=right }
需要进一步的研究学习
参考文献
[^1]: ossutils download
Picbed Migration: from Aliyun OSS to cloudflare R2
http://icarus.shaojiemike.top/2023/10/31/OutOfWork/3-homepage/PicBed/migration2cloudflare/