GithubHelp home page GithubHelp logo

picgo-plugin-minio's Issues

自建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]

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

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

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

密钥设置正确的情况下。

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

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

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

添加自定义文件夹或文件名的功能

希望上传目录或上传文件名可以自定义,参考 https://github.com/halo-dev/plugin-s3

如果作者大大有空可以考虑支持一下这个功能,详细信息如下:

以下内容摘自 https://github.com/halo-dev/plugin-s3

上传目录

上传到对象存储的目录,前后/可省略,例如/halohalo是等价的。

支持的占位符有:

  • ${uuid-with-dash}:带有-的 UUID
  • ${uuid-no-dash}:不带-的 UUID
  • ${timestamp-sec}:秒时间戳(10位时间戳)
  • ${timestamp-ms}:毫秒时间戳(13位时间戳)
  • ${year}:年份
  • ${month}:月份(两位数)
  • ${day}:日期(两位数)
  • ${weekday}:星期几,1-7
  • ${hour}:小时(24小时制,两位数)
  • ${minute}:分钟(两位数)
  • ${second}:秒(两位数)
  • ${millisecond}:毫秒(三位数)
  • ${random-alphabetic:X}:随机的小写英文字母,长度为X,例如${random-alphabetic:5}会生成abcde
  • ${random-num:X}:随机的数字,长度为X,例如${random-num:5}会生成12345
  • ${random-alphanumeric:X}:随机的小写英文字母和数字,长度为X,例如${random-alphanumeric:5}会生成abc12

示例

  • ${year}/${month}/${day}/${random-alphabetic:1}会放在2023/12/01/a
  • halo/${uuid-no-dash}会放在halo/123E4567E89B12D3A456426614174000

上传时重命名文件方式

  • 保留原文件名: 使用上传时的文件名。
  • 自定义: 使用自定义文件名模板中填写的模板,上传时替换相应占位符作后作为文件名。
  • 使用 UUID: 上传时会自动重命名为随机的 UUID。
  • 使用毫秒时间戳: 上传时会自动重命名为毫秒时间戳(13位时间戳)。
  • 使使用原文件名 + 随机字母: 上传时会自动重命名为原文件名 + 随机的小写英文字母,长度请在随机字母长度中设置。
  • 使用日期 + 随机字母: 上传时会自动重命名为日期 + 随机的小写英文字母,例如 2023-12-01-abcdefgh.png
  • 使用日期时间 + 随机字母: 上传时会自动重命名为日期时间 + 随机的小写英文字母,例如 2023-12-01T09:30:01-abcdef.png
  • 使用随机字母: 上传时会自动重命名为随机的小写英文字母,长度请在随机字母长度中设置。

随机字母长度

仅当上传时重命名文件方式使用原文件名 + 随机字母使用日期 + 随机字母使用日期时间 + 随机字母使用随机字母时出现,用于设置随机字母的长度。

自定义文件名模板

仅当上传时重命名文件方式自定义时出现,用于设置自定义文件名模板。

支持的占位符有:

  • ${origin-filename}:原文件名
  • ${uuid-with-dash}:带有-的 UUID
  • ${uuid-no-dash}:不带-的 UUID
  • ${timestamp-sec}:秒时间戳(10位时间戳)
  • ${timestamp-ms}:毫秒时间戳(13位时间戳)
  • ${year}:年份
  • ${month}:月份(两位数)
  • ${day}:日期(两位数)
  • ${weekday}:星期几,1-7
  • ${hour}:小时(24小时制,两位数)
  • ${minute}:分钟(两位数)
  • ${second}:秒(两位数)
  • ${millisecond}:毫秒(三位数)
  • ${random-alphabetic:X}:随机的小写英文字母,长度为X,例如${random-alphabetic:5}会生成abcde
  • ${random-num:X}:随机的数字,长度为X,例如${random-num:5}会生成12345
  • ${random-alphanumeric:X}:随机的小写英文字母和数字,长度为X,例如${random-alphanumeric:5}会生成abc12

示例

当原始文件名为image.png

  • ${origin-filename}-${uuid-with-dash}会生成image-123E4567-E89B-12D3-A456-426614174000.png
  • ${year}-${month}-${day}T${hour}:${minute}:${second}-${random-alphanumeric:5}会生成2023-12-01T09:30:01-abc12.png
  • ${uuid-no-dash}_file_${random-alphabetic:5}会生成123E4567E89B12D3A456426614174000_file_abcde.png
  • halo_${origin-filename}_${random-num:3}会生成halo_image_123.png

重复文件名处理方式

  • 加随机字母数字后缀: 如遇重名,会在文件名后加上4位的随机字母数字后缀,例如image.png会变成image_abc1.png
  • 加随机字母后缀: 如遇重名,会在文件名后加上4位的随机字母后缀,例如image.png会变成image_abcd.png
  • 报错不上传 如遇重名,会放弃上传,并在用户界面提示 Duplicate filename 错误。

跳过同名图片

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

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

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

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

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

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

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

证书已过期 Error: certificate has expired

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

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

关于上传路径配置问题

作者您好,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,都出现相同的问题

[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

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.