GithubHelp home page GithubHelp logo

picgo-plugin-minio's Introduction

picgo-plugin-minio

适用于MinIO的PicGo上传器

功能

  • 支持上传
  • 支持相册删除功能
  • 如果图床中存在同名文件, 则跳过该文件的上传
  • 支持跳过同名文件功能可配置(2.1.0+)
  • 支持多级目录功能(2.2.0+)
  • 将图片归档到当前日期目录功能(2.2.0+)
  • 同名文件支持 跳过覆盖保留两者 三种操作(2.3.0+)
    • 覆盖 有点小问题:GUI 的相册会同时出现新旧两张一样的图片
    • PicGO 2.3.0 可能提供了相册相关 API,等正式版出来,再看看是否可以解决该问题
  • 自定义域名(2.3.0+)

安装

在插件界面的搜索栏搜索 minio (PicGo 的插件名以 picgo-plugin- 为前缀,所以只需搜前缀后的名字即可)

搜到了插件之后只要点击右下角的安装即可。

使用

  • endPoint 对象存储服务的URL
  • port TCP/IP端口号。可选值,如果是使用HTTP的话,默认值是80;如果使用HTTPS的话,默认值是443。
  • useSSL yes代表使用HTTPS
  • accessKey Access key是唯一标识你的账户的用户ID。
  • secretKey Secret key是你账户的密码。
  • bucket 存储文件的桶。
  • 存放目录 将图片上传指定目录下, 例如 dirdir1/dir2(2.2.0+)
  • 自动归档 yes表示开启,把上传的图片归档到当天日期目录下(2.2.0+)
  • 同名文件 默认: 跳过(2.3.0+)
    • 跳过 检查 minio 中是否存在同名的文件,存在则跳过该文件的上传
    • 覆盖 不进行检查,直接上传
    • 保留两者 检查 minio 中是否存在同名的文件,存在则重命名该文件名再上传(规则:原文件名_repeat_时间戳_随机数.扩展名)
  • 自定义域名 简单的替换 endPoint 的域名(2.3.0+)

Q&A

  • Q: MinIO 无法公开访问?
    • A: 需要设置 Bucket Policy 为 Read OnlyRead and Write(建议设置为 Read Only)
  • Q: PicGo MinIO图床设置界面无法滚动问题
    • A: PicGo 的 bug 在最新版中已修复。可选方案:在插件设置 -> 点击 minio 的小齿轮 -> 配置 uploader - minio 中进行配置

参考

picgo-plugin-minio's People

Contributors

chengww5217 avatar cute-angelia avatar herbertzz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

picgo-plugin-minio's Issues

证书已过期 Error: certificate has expired

部署的minio能在web界面访问,上传与直链资源,并且在ssllib 检测证书部署没问题,但是在使用作者的插件上传图片的时候被提示证书过期。

在构造请求的时候增加"strictSSL: false"或许能解决这个问题

picgo 2.3.0.beta 4 安装 minio 报错

2021-06-06 15:10:51 [PicGo INFO] [PicGo Server] is listening at 36677
2021-06-06 15:11:25 [PicGo ERROR]
------Error Stack Begin------
Error: Cannot find module '/home/yinxiulong/.config/picgo/node_modules/picgo-plugin-minio/src/index.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (internal/modules/cjs/loader.js:232:19)
at Function.Module._findPath (internal/modules/cjs/loader.js:369:18)
at Module._resolveFilename (internal/modules/cjs/loader.js:614:27)
at Function.Module._resolveFilename (/tmp/.mount_picgo_vEmY7L/resources/electron.asar/common/reset-search-paths.js:41:16)
at Function.Module._load (internal/modules/cjs/loader.js:531:27)
at Module.require (internal/modules/cjs/loader.js:685:19)
at require (internal/modules/cjs/helpers.js:16:16)
at PluginLoader.getPlugin (/tmp/.mount_picgo_vEmY7L/resources/app.asar/node_modules/picgo/dist/src/lib/PluginLoader.js:100:16)
at PluginLoader.registerPlugin (/tmp/.mount_picgo_vEmY7L/resources/app.asar/node_modules/picgo/dist/src/lib/PluginLoader.js:68:22)
at /tmp/.mount_picgo_vEmY7L/resources/app.asar/node_modules/picgo/dist/src/lib/PluginHandler.js:16:39

图片无法上传无任何提示信息

在部署完minio后,配置了bucket,设置为public,添加用户,赋权,生成accessKey和secretKey,API设置的默认的9000,但是不能上传图片,也没有任何信息提示,这该怎么处理啊?

关于上传路径配置问题

作者您好,picgo minio上传的插件,如何配置上传到指定文件夹?或者能不能做到自动归到当前日期的文件夹下?

自建minio 使用nginx代理后上传报错

使用ip加minio监听端口可以正常上传,按照minio官方设置nginx代理,非443端口,用的其他自定义端口,出现以下错误提示

2023-06-05 21:53:39 [PicList WARN] {
  "name": "S3Error",
  "code": "AccessDenied",
  "amzRequestid": null,
  "amzId2": null,
  "amzBucketRegion": null
} 

测试过PicGo和PicList,都出现相同的问题

自动归档日期目录格式问题

// 生成日期路径
genDatePath (isAutoArchive) {
  if (!isAutoArchive) return ''

  return (new Date()).toLocaleDateString() + '/'
},

看源码中生成日期路径的方法 toLocaleDateString()不同设备貌似有差异
谷歌浏览器 显示 2022/5/22 而我上传路径显示2022-5-22

自建minio开启https上传文件提示:UNABLE_TO_VERIFY_LEAF_SIGNATURE

只要关闭就正常,开启ssl就出现这个问题,obsidian同样的设置但是没有问题,完整日志如下:
2024-03-06 22:15:48 [PicGo SUCCESS]

2024-03-06 22:18:02 [PicGo INFO] [PicGo Server] shutdown
2024-03-06 23:05:47 [PicGo INFO] [PicGo Server] is listening at 36677
2024-03-06 23:05:47 [PicGo INFO] register builtin shortKey command: [picgo:upload] - [CommandOrControl+Shift+P]
2024-03-06 23:05:47 [PicGo INFO] register builtin shortKey command: [picgo:upload] - [CommandOrControl+Shift+P] successfully
2024-03-06 23:08:50 [PicGo INFO] Before transform
2024-03-06 23:08:50 [PicGo INFO] Transforming... Current transformer is [path]
2024-03-06 23:08:50 [PicGo INFO] Before upload
2024-03-06 23:08:50 [PicGo INFO] beforeUploadPlugins: renameFn running
2024-03-06 23:08:50 [PicGo INFO] Uploading... Current uploader is [minio]
2024-03-06 23:08:50 [PicGo WARN] {
"code": "UNABLE_TO_VERIFY_LEAF_SIGNATURE"
}
2024-03-06 23:08:50 [PicGo SUCCESS]

[PicGo SUCCESS] undefined

2021-06-07 14:40:03 [PicGo INFO] Before transform
2021-06-07 14:40:03 [PicGo INFO] Transforming... Current transformer is [path]
2021-06-07 14:40:03 [PicGo WARN] can't get D:\开源学习\前端\Tabbar\pages.json's image size
2021-06-07 14:40:03 [PicGo WARN] fallback to 200 * 200
2021-06-07 14:40:03 [PicGo INFO] Before upload
2021-06-07 14:40:03 [PicGo INFO] beforeUploadPlugins: renameFn running
2021-06-07 14:40:03 [PicGo INFO] Uploading... Current uploader is [minio]
2021-06-07 14:40:03 [PicGo SUCCESS]
undefined

image

跳过同名图片

跳过同名图片怎么理解,覆盖还是不覆盖?

测试了下, 都是覆盖的, 不管选择 no、yes

既然叫“跳过同名图片”, 应该不覆盖 bucket 里面的图片, 如果选 yes 应该是生成一张按时间错随机命名的图片

最新版本的minio,上传报错。

密钥设置正确的情况下。

2023-10-12 14:30:12 [PicGo WARN] {
"name": "S3Error",
"code": "AccessDenied",
"amzRequestid": "178D48603037A940",
"amzId2": "dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8"
}

使用 相同密钥,py的api可以上传成功。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.