3.3.1 • Published 1 year ago

picgo-plugin-dogecloud v3.3.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

picgo-plugin-dogecloud

PicGo 多吉云(dogecloud)上传插件。支持 PicGo GUI 。

多吉云(dogecloud)云存储使用的是腾讯云COS或阿里云OSS作为存储空间的底层服务,支持AWS S3 SDK上传。由于并非自家开发的底层存储服务,所以相较于通用的AWS S3 SDK上传,要多传输一个临时sessionToken。而现有的picgo-plugin-s3无法直接使用,因此拿来小小改了一下,感谢前任开发者wayjam

关于此插件的详细说明可见《PicGo插件:上传到多吉云存储》

特别鸣谢

特别感谢开发者@mingxuan对本插件的杰出贡献,从而大大简化了使用本插件的流程。

特别感谢开发者@dwxh对插件适配新版picgo-core的巨大帮助。

使用说明

使用本插件的必需条件是,你首先应当创建一个标准存储空间,因为只有标准存储才支持 SDK 操作

1.在密钥管理页面获取AccessKeySecretKey

2.在云存储中选择对应的空间列表,点击右侧SDK参数,记录s3Bucket

填入配置

Key说明例子
AccessKey用户AccessKey1v80b5xxxxx9sc9b0
SecretKey用户SecretKey6adcaf272xxxxxxxx52f26ddsad244cb
bucketNames3buckets-gz-2384-xxxxxxx
urlPrefix存储空间绑定的CDN域名https://img.example.com
uploadPath上传路径{year}/{month}/{fullName}
urlSuffix自定义后缀/shuiyin
forceRefreshToken是否强制刷新Token每天可调用八千次,建议打开

填写图示

上传路径为空则默认以原始文件名上传到根目录,如指定目录则必需添加 payload:

payload描述
{year}当前日期 - 年
{month}当前日期 - 月
{day}当前日期 - 日
{fullName}完整文件名(含扩展名)
{fileName}文件名(不含扩展名)
{extName}扩展名(不含.
{md5}图片 MD5 计算值
{sha1}图片 SHA1 计算值
{sha256}图片 SHA256 计算值

示例

GUI端配置参考上方“配置”,忽略此项。

    "dogecloud": {
      "AccessKey": "xxxxxxx",
      "SecretKey": "xxxxxxxxxxxx",
      "bucketName": "s-gz-2384-xxxxxxx",
      "uploadPath": "{year}/{md5}.{extName}",
      "urlPrefix": "https://img.example.com/"
    }

如果 PicGo 像以上配置,执行上传:picgo upload sample.png,则最终得到图片地址为:https://img.example.com/2022/4aa4f41e38817e5fd38ac870f40dbc70.jpg

TODO:

1.token.json 这个存储方式目前无法生效,建议和 picgo-core 作者讨论研究合适的数据持久化方式。

2.完善上传失败的提示。(L218-L225)

3.AWS.S3 API 过时,需要根据 AWS 的相关文档更新 uploader.ts L19-L22 的使用。

4.完善 uploader.ts L58 失败的提示。

5.完善 index.ts L143 的类型。

发布

With the following command, a versioned commit which modifies the version of package.json would be genereated and pushed to the origin. Github Action will automatically compile this pacakage and publish it to NPM.

npm run patch
npm run minor
npm run major

开源许可

Released under the MIT License.

3.3.1

1 year ago

3.3.0

1 year ago

3.2.0

2 years ago

3.0.4

2 years ago

3.1.1

2 years ago

3.0.2

2 years ago

3.1.0

2 years ago

3.0.1

2 years ago

3.0.5

2 years ago

3.0.0

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

0.0.1

2 years ago