Provide image resizing, cropping, upload/download, and cloud storage features for Obsidian CIAU.
10K+
This project provides image uploading, storage, and cloud synchronization services for the Custom Image Auto Uploader Obsidian plugin.
To view the complete update details, please visit Changelog.
This software is open-source and free. If you would like to show your appreciation or support continued development, you can do so via the following method:
Directory Setup
# Create the required directories for the project
mkdir -p /data/image-api
cd /data/image-api
mkdir -p ./config && mkdir -p ./storage/logs && mkdir -p ./storage/uploads
On first startup, if the configuration file is not downloaded, the program will automatically generate a default configuration in config/config.yaml.
If you want to download the default configuration from the network, use the following command:
# Download the default configuration file from the open-source repository to the config directory
wget -P ./config/ https://raw.githubusercontent.com/haierkeys/obsidian-image-api-gateway/main/config/config.yaml
Containerized Installation (Docker Method)
Assuming your server stores images at /data/storage/uploads, execute the following commands:
# Pull the latest container image
docker pull haierkeys/obsidian-image-api-gateway:latest
# Create and start the container
docker run -tid --name image-api \
-p 9000:9000 -p 9001:9001 \
-v /data/image-api/storage/:/api/storage/ \
-v /data/image-api/config/:/api/config/ \
haierkeys/obsidian-image-api-gateway:latest
Using the Single-Service API
Supports Local Storage, OSS, Cloudflare R2, Amazon S3, and MinIO.
Modify config.yaml
Change http-port and auth-token options.
Start the gateway program.
The API gateway address is http://{IP:PORT}/api/upload
The API access token is the content of auth-token.
Using the Multi-User Public Service API
Supports OSS, Cloudflare R2, and Amazon S3.
Modify config.yaml
Change http-port and database.
Also, set user.is-enable and user.register-is-enable to true.
Start the gateway program.
Access the WebGUI at http://{IP:PORT} to configure user registration.
The API gateway address is http://{IP:PORT}/api/user/upload.
Click on WebGUI to copy API configuration and obtain setup details.
The default configuration file is named config.yaml. Place it in the root directory or the config directory.
For more configuration details, refer to:
Content type
Image
Digest
sha256:bc6d2449c…
Size
61.7 MB
Last updated
11 months ago
docker pull haierkeys/obsidian-image-api-gateway