{"id":25127843,"url":"https://github.com/haierkeys/obsidian-image-api-gateway","last_synced_at":"2025-10-27T16:05:22.312Z","repository":{"id":193870586,"uuid":"688700290","full_name":"haierkeys/obsidian-image-api-gateway","owner":"haierkeys","description":"image upload api gateway for obsidian-custom-image-auto-uploader ; 该项目为 Custom Image Auto Uploader Obsidian 插件提供图片上传、存储与云同步服务。","archived":false,"fork":false,"pushed_at":"2025-04-02T02:36:38.000Z","size":1277,"stargazers_count":16,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T03:29:22.961Z","etag":null,"topics":["aws","cloudflare-r2","gateway","image-api","nas","obsidian","oss"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haierkeys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-07T23:22:45.000Z","updated_at":"2025-04-02T02:36:41.000Z","dependencies_parsed_at":"2024-04-10T04:32:20.288Z","dependency_job_id":"be8b286f-0ad2-4dbc-9279-569e87e864c1","html_url":"https://github.com/haierkeys/obsidian-image-api-gateway","commit_stats":null,"previous_names":["haierspi/golang-image-upload-service","haierkeys/golang-image-upload-service","haierkeys/obsidian-image-api-gateway","haierkeys/image-api-gateway"],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haierkeys%2Fobsidian-image-api-gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haierkeys%2Fobsidian-image-api-gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haierkeys%2Fobsidian-image-api-gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haierkeys%2Fobsidian-image-api-gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haierkeys","download_url":"https://codeload.github.com/haierkeys/obsidian-image-api-gateway/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250453135,"owners_count":21433151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cloudflare-r2","gateway","image-api","nas","obsidian","oss"],"created_at":"2025-02-08T11:19:05.809Z","updated_at":"2025-10-13T17:02:46.356Z","avatar_url":"https://github.com/haierkeys.png","language":"Go","funding_links":["https://ko-fi.com/haierkeys"],"categories":[],"sub_categories":[],"readme":"[中文文档](readme-zh.md) / [English Document](README.md)\r\n# Obsidian Image API Gateway\r\n\r\n\u003cp align=\"center\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/github/release/haierkeys/obsidian-image-api-gateway\" alt=\"version\"\u003e\r\n    \u003cimg src=\"https://img.shields.io/github/license/haierkeys/obsidian-image-api-gateway\" alt=\"license\"\u003e\r\n\u003c/p\u003e\r\n\r\nThis project provides image uploading, storage, and cloud synchronization services for the [Custom Image Auto Uploader](https://github.com/haierkeys/obsidian-custom-image-auto-uploader) Obsidian plugin.\r\n\r\n## Feature List\r\n\r\n- [x] Support for image uploading\r\n- [x] Support for token authorization to enhance API security\r\n- [x] Support for image HTTP access (basic feature, Nginx recommended as an alternative)\r\n- [x] Storage support:\r\n  - [x] Save to both local and cloud storage for easy migration\r\n  - [x] Local storage support (tested for NAS)\r\n  - [x] Support for Alibaba Cloud OSS storage (implemented but not tested)\r\n  - [x] Support for Cloudflare R2 storage (implemented and tested)\r\n  - [x] Support for Amazon S3 (implemented and tested)\r\n  - [x] Added MinIO storage support (v1.5+)\r\n  - [x] Support for WebDAV storage (v2.5+)\r\n- [x] Provide Docker installation support for use on home NAS or remote servers\r\n- [x] Provide public service API \u0026 Web interface for offering public services \u003ca href=\"#userapi\"\u003eUser Public Interface \u0026 Web Interface\u003c/a\u003e\r\n\r\n## Changelog\r\n\r\nFor the complete update details, please visit [Changelog](https://github.com/haierkeys/obsidian-image-api-gateway/releases).\r\n\r\n## Price\r\n\r\nThis software is open source and free. If you would like to show appreciation or help support continued development, you can support me in the following ways:\r\n\r\n[\u003cimg src=\"https://cdn.ko-fi.com/cdn/kofi3.png?v=3\" alt=\"BuyMeACoffee\" width=\"100\"\u003e](https://ko-fi.com/haierkeys)\r\n\r\n## Quick Start\r\n### Installation\r\n\r\n- Directory Setup\r\n\r\n  ```bash\r\n  # Create the directories needed for the project\r\n  mkdir -p /data/image-api\r\n  cd /data/image-api\r\n\r\n  mkdir -p ./config \u0026\u0026 mkdir -p ./storage/logs \u0026\u0026 mkdir -p ./storage/uploads\r\n  ```\r\n\r\n  If you do not download the configuration file on the first startup, the program will automatically generate a default configuration at **config/config.yaml**\r\n\r\n  If you want to download a default configuration from the network, use the following command\r\n\r\n  ```bash\r\n  # Download default configuration file from the open-source repository to the configuration directory\r\n  wget -P ./config/ https://raw.githubusercontent.com/haierkeys/obsidian-image-api-gateway/main/config/config.yaml\r\n  ```\r\n\r\n- Binary Installation\r\n\r\n  Download the latest version from [Releases](https://github.com/haierkeys/obsidian-image-api-gateway/releases), extract, and execute:\r\n\r\n  ```bash\r\n  ./image-api run -c config/config.yaml\r\n  ```\r\n\r\n- Containerized Installation (Docker Method)\r\n\r\n  Docker Command:\r\n\r\n  ```bash\r\n  # Pull the latest container image\r\n  docker pull haierkeys/obsidian-image-api-gateway:latest\r\n\r\n  # Create and start the container\r\n  docker run -tid --name image-api \\\r\n          -p 9000:9000 -p 9001:9001 \\\r\n          -v /data/image-api/storage/:/api/storage/ \\\r\n          -v /data/image-api/config/:/api/config/ \\\r\n          haierkeys/obsidian-image-api-gateway:latest\r\n  ```\r\n\r\n  Docker Compose\r\n  Use *containrrr/watchtower* to monitor the image and automatically update the project\r\n  The content of **docker-compose.yaml** is as follows\r\n\r\n  ```yaml\r\n  # docker-compose.yaml\r\n  services:\r\n    image-api:\r\n      image: haierkeys/obsidian-image-api-gateway:latest  # Your application image\r\n      container_name: image-api\r\n      ports:\r\n        - \"9000:9000\"  # Map port 9000\r\n        - \"9001:9001\"  # Map port 9001\r\n      volumes:\r\n        - /data/image-api/storage/:/api/storage/  # Map storage directory\r\n        - /data/image-api/config/:/api/config/    # Map configuration directory\r\n      restart: always\r\n  ```\r\n\r\n  Execute **docker compose**\r\n\r\n  Register the docker container as a service\r\n\r\n  ```bash\r\n  docker compose up -d\r\n  ```\r\n\r\n  Deregister and destroy the docker container\r\n\r\n  ```bash\r\n  docker compose down\r\n  ```\r\n\r\n### Usage\r\n\r\n- **Using Single Service Gateway**\r\n\r\n  Supports `Local Storage`, `OSS`, `Cloudflare R2`, `Amazon S3`, `MinIO`, `WebDAV`\r\n\r\n  Need to modify [config.yaml](config/config.yaml#http-port)\r\n\r\n  Modify the two options `http-port` and `auth-token`\r\n\r\n  Start the gateway program\r\n\r\n  The API gateway address is `http://{IP:PORT}/api/upload`\r\n\r\n  The API access token is the content of `auth-token`\r\n\r\n- **Using Multi-User Open Gateway**\r\n\r\n  Supports `Local Storage`, `OSS`, `Cloudflare R2`, `Amazon S3`, `MinIO` (v2.3+), `WebDAV` (v2.5+)\r\n\r\n  Need to modify in [config.yaml](config/config.yaml#user)\r\n\r\n  `http-port` and `database`\r\n\r\n  Also modify `user.is-enable` and `user.register-is-enable` to `true`\r\n\r\n  Start the gateway program\r\n\r\n  Access the `WebGUI` address `http://{IP:PORT}` for user registration configuration\r\n\r\n  ![Image](https://github.com/user-attachments/assets/39c798de-b243-42c1-a75a-cd179913fc49)\r\n\r\n  The API gateway address is `http://{IP:PORT}/api/user/upload`\r\n\r\n  Click to copy API configuration in `WebGUI` to get configuration information\r\n\r\n- **Storage Type Description**\r\n\r\n  | Storage Type         | Description                                                                                                                                                                                                                                                                                                                                                                                                                           |\r\n  |----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\r\n  | Server Local Storage | The default save path is: `/data/storage/uploads` related configuration item `config.local-fs.save-path` is `storage/uploads`, \u003cbr /\u003eIf using gateway image resource access service, `config.local-fs.httpfs-is-enable` needs to be set to `true` \u003cbr /\u003e The corresponding `access address prefix` is `http://{IP:PORT}`, using single service gateway set `config.app.upload-url-pre` \u003cbr /\u003eNginx is recommended for resource access |\r\n\r\n### Configuration Description\r\n\r\nThe default configuration file name is **config.yaml**, please place it in the **root directory** or **config** directory.\r\n\r\nFor more configuration details, please refer to:\r\n\r\n- [config/config.yaml](config/config.yaml)\r\n\r\n## Other Resources\r\n\r\n- [Obsidian Auto Image Remote Uploader](https://github.com/haierkeys/obsidian-auto-image-remote-uploader)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaierkeys%2Fobsidian-image-api-gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaierkeys%2Fobsidian-image-api-gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaierkeys%2Fobsidian-image-api-gateway/lists"}