Open xaya1001 opened 1 year ago
by the way, I'm using lsky-pro as self-hosted image server. https://github.com/lsky-org/lsky-pro
here are my settings:
api endpoint:https://img.domain.com/api/v1/upload
upload header:
{
"Authorization": "Bearer xxxx",
"Accept": "application/json",
"Content-Type": "multipart/form-data"
}
upload body:
{
"file": "$FILE"
}
Image Url Path: data.links.url
Yes, I also have the need to upload local images. Although the "Image Auto Upload Plugin" can achieve this functionality, it requires the installation of an additional tool called PicGo. It would be perfect if the ability to batch upload local existing images could be added without the need for PicGo.
@xaya1001 Good jobs. I implement this feature by referencing your code. A new version will be released soon. Please refer https://github.com/Creling/obsidian-image-uploader/commit/5cd9743b9e7d8a94b0f990b114402b8a6e159244 for more details.
@africa1207 Yes, I also don't want to install extra tools, which is why I developed this plugin.
Hello,
I'm a user of your Image Uploader plugin for Obsidian, and I've found it to be a very useful tool. However, I found myself needing to upload a large number of local images (over 2000) to my self-hosted image server.
With some assistance from GPT-4, I've written some code to add this bulk image upload functionality to the plugin. It allowed me to successfully upload all my local images to my server, and I thought that this feature might be beneficial to other users of your plugin who are in a similar situation.
Here is the code that I've written:
Please feel free to use this code as you see fit. If you find it useful and believe it could be beneficial for other users (especially new users), consider incorporating it into the plugin as a new feature. I am not a programmer, and although I have tested the code and it works for my use case, it may not be perfect. As such, I'm providing it here for your reference rather than submitting a pull request.