yabostone / picgo-plugin-rclone

调用rclone命令实现上传
Apache License 2.0
17 stars 4 forks source link

我想利用Rclone和PicGo实现上传图片后自动复制链接 #7

Open AkarinLiu opened 1 year ago

AkarinLiu commented 1 year ago

最近,我开通了Cloudflare的R2存储,想试试能不能通过万能的Rclone来实现管理存储桶中的图片。

AkarinLiu commented 1 year ago

但是出了一些问题,我尝试上传在剪贴板的图片的时候,提示上传失败 日志如下:

2023-09-28 15:50:01 [PicGo ERROR] 
------Error Stack Begin------
SyntaxError: Unexpected token o in JSON at position 1
    at JSON.parse (<anonymous>)
    at Object.handle (C:\Users\AkarinLiu\AppData\Roaming\picgo\node_modules\picgo-plugin-compression\src\index.js:119:60)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async C:\Users\AkarinLiu\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:17809
    at async Promise.all (index 0)
    at async $e.handlePlugins (C:\Users\AkarinLiu\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:17731)
    at async $e.beforeUpload (C:\Users\AkarinLiu\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:16829)
    at async $e.start (C:\Users\AkarinLiu\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:15942)
    at async Tt.upload (C:\Users\AkarinLiu\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:71624)
    at async Object.upload (C:\Users\AkarinLiu\AppData\Local\Programs\PicGo\resources\app.asar\background.js:2:653584)
-------Error Stack End------- 
2023-09-28 15:50:01 [PicGo ERROR] 
------Error Stack Begin------
SyntaxError: Unexpected token o in JSON at position 1
    at JSON.parse (<anonymous>)
    at Object.handle (C:\Users\AkarinLiu\AppData\Roaming\picgo\node_modules\picgo-plugin-compression\src\index.js:119:60)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async C:\Users\AkarinLiu\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:17809
    at async Promise.all (index 0)
    at async $e.handlePlugins (C:\Users\AkarinLiu\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:17731)
    at async $e.beforeUpload (C:\Users\AkarinLiu\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:16829)
    at async $e.start (C:\Users\AkarinLiu\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:15942)
    at async Tt.upload (C:\Users\AkarinLiu\AppData\Local\Programs\PicGo\resources\app.asar\node_modules\picgo\dist\index.cjs.js:1:71624)
    at async Object.upload (C:\Users\AkarinLiu\AppData\Local\Programs\PicGo\resources\app.asar\background.js:2:653584)
-------Error Stack End------- 
AkarinLiu commented 1 year ago

另外有一些疑问:可以将坚果云作为图床吗?

yabostone commented 10 months ago

您好,请在使用rclone前手动运行rclone ls yourrepo: 进行测试和验证,判断rclone 可以正常列出文件,然后创建一个对应的文件夹和上传文件,经过验证后再尝试使用插件。 注意rclone 在第一次生成repo的位置的时候,需要手动创建和生成。

yabostone commented 10 months ago

可以使用坚果云作为图床,但是流量上有限制,具体nustore的存储使用webdav的方式就可以。