Kuingsmile / PicList

An image upload and manage tool, base on PicGo
https://piclist.cn
MIT License
2.06k stars 88 forks source link

[Feature]: 上传接口参数指定图床配置? #151

Closed toyo2333 closed 7 months ago

toyo2333 commented 7 months ago

前置阅读 | Pre-reading

PicList的版本 | PicList Version

最新

系统信息 | System Information

Windows

功能请求 | Feature request

我由2个Obsidian的Vault,一个是note,一个是blog。我在R2的的桶里建立了2个文件夹,一个是note,一个是blog。我在plist里设置了2套配置,分别传到这两个不同的文件夹。当我打开笔记vault的时候我要去plist里把默认上传改为note的配置,当我打开博客vault的时候,我要去plist里把默认上传改为blog的配置,这样对应的图片在才能传到给自的文件夹里保存。

有没有可能,在配置image auto upload的时候 可以填写对应的配置,或者在命令行里 可以带参数。

这样我就一次性的就设置好了。不用每次去piclist里切换或者忘记切换导致传错了。

我这种情况不知道常见不常见,讨论下。

Kuingsmile commented 7 months ago

进入配置后,点击这个复制API,然后拷贝到插件对应的上传接口设置里就行。复制出来的格式类似于 http://127.0.0.1:36677/upload?picbed=local&configName=Default 其中的picbed和configName两个参数就是用来指定图床和配置的,这样即使PicList的当前图床和配置不符合,也依然会上传到你的接口指定的图床里。

image

toyo2333 commented 7 months ago

Cool,这个正是我需要的。

cyclestudy commented 1 month ago

image 请问一下 这个 picgo 的这种配置在 piclist 中怎么配置,谢谢!

xiamuguizhi commented 1 month ago

@Kuingsmile 这个七牛是不是对“2-4mb” 的图片上传限制啊!

上传 需要 1- 2分钟差不多,太难受了!

2024-08-16 08:11:32 [PicList INFO] [PicList Server] is listening at 36677 of 0.0.0.0 
2024-08-16 08:11:32 [PicList INFO] Web server is not enabled 
2024-08-16 08:11:32 [PicList INFO] File server is running, http://localhost:36699 
2024-08-16 08:12:21 [PicList INFO] detect second instance 
2024-08-16 08:21:56 [PicList INFO] [PicList Server] shutdown 
2024-08-16 08:21:56 [PicList INFO] Web server is stopped 
2024-08-16 08:21:56 [PicList INFO] File server is stopped 
2024-08-16 08:49:07 [PicList INFO] [PicList Server] is listening at 36677 of 0.0.0.0 
2024-08-16 08:49:07 [PicList INFO] Web server is not enabled 
2024-08-16 08:49:07 [PicList INFO] File server is running, http://localhost:36699 
2024-08-16 08:50:38 [PicList INFO] [PicList Server] shutdown 
2024-08-16 08:50:38 [PicList INFO] Web server is stopped 
2024-08-16 08:50:38 [PicList INFO] File server is stopped 
2024-08-16 19:51:17 [PicList INFO] [PicList Server] is listening at 36677 of 0.0.0.0 
2024-08-16 19:51:17 [PicList INFO] Web server is not enabled 
2024-08-16 19:51:17 [PicList INFO] File server is running, http://localhost:36699 
2024-08-16 19:55:39 [PicList INFO] Before transform 
2024-08-16 19:55:39 [PicList INFO] Transforming... Current transformer is [path] 
2024-08-16 19:55:39 [PicList INFO] Before upload 
2024-08-16 19:55:39 [PicList INFO] beforeUploadPlugins: renameFn running 
2024-08-16 19:55:39 [PicList INFO] Uploading... Current uploader is [qiniu] 
2024-08-16 19:55:40 [PicList SUCCESS] 
https://xxxxxxxxxxxxxxxtx.jpg 
2024-08-16 20:23:26 [PicList INFO] Before transform 
2024-08-16 20:23:26 [PicList INFO] Transforming... Current transformer is [path] 
2024-08-16 20:23:26 [PicList INFO] Before upload 
2024-08-16 20:23:26 [PicList INFO] beforeUploadPlugins: renameFn running 
2024-08-16 20:23:26 [PicList INFO] Uploading... Current uploader is [qiniu] 
2024-08-16 20:24:12 [PicList INFO] Before transform 
2024-08-16 20:24:12 [PicList INFO] Transforming... Current transformer is [path] 
2024-08-16 20:24:12 [PicList INFO] Before upload 
2024-08-16 20:24:12 [PicList INFO] beforeUploadPlugins: renameFn running 
2024-08-16 20:24:12 [PicList INFO] Uploading... Current uploader is [qiniu] 
2024-08-16 20:25:20 [PicList SUCCESS] 
https://xxxxxxxxxxxxxxxIMG_20240816_200919.jpg 
2024-08-16 20:25:20 [PicList SUCCESS] 
https://xxxxxxxxxxxxxxxIMG_20240816_200919.jpg 
2024-08-16 20:27:17 [PicList INFO] Before transform 
2024-08-16 20:27:17 [PicList INFO] Transforming... Current transformer is [path] 
2024-08-16 20:27:18 [PicList INFO] Before upload 
2024-08-16 20:27:18 [PicList INFO] beforeUploadPlugins: renameFn running 
2024-08-16 20:27:18 [PicList INFO] Uploading... Current uploader is [qiniu] 
2024-08-16 20:27:21 [PicList SUCCESS] 
https://xxxxxxxxxxxxxxx202408162027981.jpg 
2024-08-16 20:28:30 [PicList INFO] Before transform 
2024-08-16 20:28:30 [PicList INFO] Transforming... Current transformer is [path] 
2024-08-16 20:28:31 [PicList INFO] Before upload 
2024-08-16 20:28:31 [PicList INFO] beforeUploadPlugins: renameFn running 
2024-08-16 20:28:31 [PicList INFO] Uploading... Current uploader is [qiniu] 
2024-08-16 20:28:34 [PicList SUCCESS] 
https://xxxxxxxxxxxxxxx202408162028002.jpg 
2024-08-16 20:30:16 [PicList INFO] Before transform 
2024-08-16 20:30:16 [PicList INFO] Transforming... Current transformer is [path] 
2024-08-16 20:30:16 [PicList INFO] Before upload 
2024-08-16 20:30:16 [PicList INFO] beforeUploadPlugins: renameFn running 
2024-08-16 20:30:16 [PicList INFO] Uploading... Current uploader is [qiniu] 
2024-08-16 20:31:53 [PicList SUCCESS] 
https://xxxxxxxxxxxxxxx202408162030658.jpg 
2024-08-16 20:33:21 [PicList INFO] Before transform 
2024-08-16 20:33:21 [PicList INFO] Transforming... Current transformer is [path] 
2024-08-16 20:33:21 [PicList INFO] Before upload 
2024-08-16 20:33:21 [PicList INFO] beforeUploadPlugins: renameFn running 
2024-08-16 20:33:21 [PicList INFO] Uploading... Current uploader is [qiniu] 
2024-08-16 20:35:04 [PicList SUCCESS] 
https://xxxxxxxxxxxxxxx202408162033368.jpg 
2024-08-16 20:36:21 [PicList INFO] [PicList Server] shutdown 
2024-08-16 20:36:21 [PicList INFO] Web server is stopped 
2024-08-16 20:36:21 [PicList INFO] File server is stopped 
2024-08-16 20:39:37 [PicList INFO] [PicList Server] is listening at 36677 of 0.0.0.0 
2024-08-16 20:39:37 [PicList INFO] Web server is not enabled 
2024-08-16 20:39:37 [PicList INFO] File server is running, http://localhost:36699 
2024-08-16 20:42:25 [PicList INFO] Before transform 
2024-08-16 20:42:25 [PicList INFO] Transforming... Current transformer is [path] 
2024-08-16 20:42:25 [PicList INFO] Before upload 
2024-08-16 20:42:25 [PicList INFO] beforeUploadPlugins: renameFn running 
2024-08-16 20:42:25 [PicList INFO] Uploading... Current uploader is [qiniu] 
2024-08-16 20:44:34 [PicList SUCCESS] 
https://xxxxxxxxxxxxxxx202408162042305.jpg 
2024-08-16 20:45:19 [PicList INFO] Before transform 
2024-08-16 20:45:19 [PicList INFO] Transforming... Current transformer is [path] 
2024-08-16 20:45:19 [PicList INFO] Before upload 
2024-08-16 20:45:19 [PicList INFO] beforeUploadPlugins: renameFn running 
2024-08-16 20:45:19 [PicList INFO] Uploading... Current uploader is [qiniu] 
2024-08-16 20:47:56 [PicList SUCCESS] 
https://xxxxxxxxxxxxxxx202408162045140.jpg 
2024-08-16 20:48:15 [PicList INFO] Before transform 
2024-08-16 20:48:15 [PicList INFO] Transforming... Current transformer is [path] 
2024-08-16 20:48:16 [PicList INFO] Before upload 
2024-08-16 20:48:16 [PicList INFO] beforeUploadPlugins: renameFn running 
2024-08-16 20:48:16 [PicList INFO] Uploading... Current uploader is [qiniu] 
2024-08-16 20:51:27 [PicList INFO] Before transform 
2024-08-16 20:51:27 [PicList INFO] Transforming... Current transformer is [path] 
2024-08-16 20:51:27 [PicList INFO] Before upload 
2024-08-16 20:51:27 [PicList INFO] beforeUploadPlugins: renameFn running 
2024-08-16 20:51:27 [PicList INFO] Uploading... Current uploader is [qiniu] 
2024-08-16 20:51:30 [PicList SUCCESS] 
https://xxxxxxxxxxxxxxx202408162051548.jpg 
2024-08-16 20:52:13 [PicList INFO] Before transform 
2024-08-16 20:52:13 [PicList INFO] Transforming... Current transformer is [path] 
2024-08-16 20:52:13 [PicList INFO] Before upload 
2024-08-16 20:52:13 [PicList INFO] beforeUploadPlugins: renameFn running 
2024-08-16 20:52:13 [PicList INFO] Uploading... Current uploader is [qiniu] 
2024-08-16 20:52:19 [PicList SUCCESS] 
https://xxxxxxxxxxxxxxx202408162052727.jpg 
2024-08-16 20:52:28 [PicList INFO] Before transform 
2024-08-16 20:52:28 [PicList INFO] Transforming... Current transformer is [path] 
2024-08-16 20:52:28 [PicList INFO] Before upload 
2024-08-16 20:52:28 [PicList INFO] beforeUploadPlugins: renameFn running 
2024-08-16 20:52:28 [PicList INFO] Uploading... Current uploader is [qiniu] 
2024-08-16 20:52:35 [PicList SUCCESS] 
https://xxxxxxxxxxxxxxx202408162052863.jpg 
2024-08-16 20:52:46 [PicList INFO] Before transform 
2024-08-16 20:52:46 [PicList INFO] Transforming... Current transformer is [path] 
2024-08-16 20:52:46 [PicList INFO] Before upload 
2024-08-16 20:52:46 [PicList INFO] beforeUploadPlugins: renameFn running 
2024-08-16 20:52:46 [PicList INFO] Uploading... Current uploader is [qiniu] 
2024-08-16 20:53:24 [PicList INFO] Before transform 
2024-08-16 20:53:24 [PicList INFO] Transforming... Current transformer is [path] 
2024-08-16 20:53:24 [PicList INFO] Before upload 
2024-08-16 20:53:24 [PicList INFO] beforeUploadPlugins: renameFn running 
2024-08-16 20:53:24 [PicList INFO] Uploading... Current uploader is [qiniu] 
2024-08-16 20:54:26 [PicList SUCCESS] 
https://xxxxxxxxxxxxxxx202408162052089.jpg 
2024-08-16 20:54:42 [PicList SUCCESS] 
https://xxxxxxxxxxxxxxx202408162053132.jpg 
2024-08-16 20:55:02 [PicList SUCCESS] 
https://xxxxxxxxxxxxxxx202408162048006.jpg 
Eyion commented 4 weeks ago

前置阅读 | Pre-reading

PicList的版本 | PicList Version

PicList 的版本 | PicList 版本 最新

系统信息 | System Information

Windows

功能请求 | Feature request

我由2个Obsidian的Vault,一个是note,一个是blog。我在R2的的桶里建立了2个文件夹,一个是note,一个是blog。我在plist里设置了2套配置,分别传到这两个不同的文件夹。当我打开笔记vault的时候我要去plist里把默认上传改为note的配置,当我打开博客vault的时候,我要去plist里把默认上传改为blog的配置,这样对应的图片在才能传到给自的文件夹里保存。

有没有可能,在配置image auto upload的时候 可以填写对应的配置,或者在命令行里 可以带参数。

这样我就一次性的就设置好了。不用每次去piclist里切换或者忘记切换导致传错了。

我这种情况不知道常见不常见,讨论下。

我的情况可能是你这种情况的极端,因为我的是产品图片,每个分类下面每个产品图片单独一个文件夹(如果放一起感觉以后需要找某产品的图片比较费劲)

Eyion commented 4 weeks ago

进入配置后,点击这个复制API,然后拷贝到插件对应的上传接口设置里就行。复制出来的格式类似于 http://127.0.0.1:36677/upload?picbed=local&configName=Default 其中的picbed和configName两个参数就是用来指定图床和配置的,这样即使PicList的当前图床和配置不符合,也依然会上传到你的接口指定的图床里。

如果我设置了Default1配置,但在插件中还想使用Default2、Default3,是否可以直接把Default1的API中configName修改成相应的Default2、Default3即可,还是仍需要在Pclist中设置对应的Default2、Default3? 或者可以增加个批量导入配置?

Kuingsmile commented 3 weeks ago

API直接改configName就可以 不用在软件里改

Eyion commented 3 weeks ago

可能我表述不准确。 重新狡辩1次:在Piclist只设置了Default1配置(Pclist中没有设置Default2、Default3),但在插件中还想使用类似于Default1配置的Default2、Default3,可以直接把Default1的API中configName修改成相应的Default2、Default3吗(Default2、Default3有对应S3相同桶不同文件夹路径)? 因为图片是按产品分类存储,所以文件夹较多,如果每个产品手动设置1个配置或上传每个产品图片时修改路径都将导致工作量庞大,所以若上述操作不可行,能否考虑支持批量导入对图床的设置。