{"id":23213961,"url":"https://github.com/tyler-tee/ephemeral-image-storage","last_synced_at":"2026-05-16T01:33:54.647Z","repository":{"id":263498014,"uuid":"890558229","full_name":"tyler-tee/ephemeral-image-storage","owner":"tyler-tee","description":"A Cloudflare Worker for generating temporary URLs to store and retrieve images.","archived":false,"fork":false,"pushed_at":"2025-01-22T04:38:28.000Z","size":276,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-01T06:15:27.404Z","etag":null,"topics":["api","automation","cloudflare","image-processing","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tyler-tee.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":"2024-11-18T19:26:23.000Z","updated_at":"2025-05-23T02:06:35.000Z","dependencies_parsed_at":"2024-11-18T22:24:38.278Z","dependency_job_id":"145f365c-4906-4bc6-b45d-1bfd3801db89","html_url":"https://github.com/tyler-tee/ephemeral-image-storage","commit_stats":null,"previous_names":["tyler-tee/ephemeral-image-storage"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tyler-tee/ephemeral-image-storage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler-tee%2Fephemeral-image-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler-tee%2Fephemeral-image-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler-tee%2Fephemeral-image-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler-tee%2Fephemeral-image-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tyler-tee","download_url":"https://codeload.github.com/tyler-tee/ephemeral-image-storage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyler-tee%2Fephemeral-image-storage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33087028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["api","automation","cloudflare","image-processing","typescript"],"created_at":"2024-12-18T19:20:23.341Z","updated_at":"2026-05-16T01:33:54.630Z","avatar_url":"https://github.com/tyler-tee.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ephemeral Storage Worker\n\n![SonarCloud Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=tyler-tee_ephemeral-image-storage\u0026metric=alert_status)\n\n\nA Cloudflare Worker for generating temporary URLs to store and retrieve images. This project is designed to enable secure, short-lived storage for workflows, such as relaying images for analysis by GPT-4o, without consuming excessive input tokens (reducing prompt token consumption from about 37k to 1.2k).\n\n## Features\n- **Ephemeral Storage**: Images are stored temporarily using Cloudflare KV with a customizable expiration time.\n- **Secure Relay**: Temporary URLs ensure secure access to image data for limited durations.\n- **Integration-Ready**: Built to seamlessly integrate with workflows using tools like Tines and OpenAI's APIs.\n\n---\n\n## How It Works\n1. **Upload an Image**:\n   - Send raw image bytes to the `/upload` endpoint.\n   - The Worker generates a unique URL with a 1-minute expiration.\n2. **Retrieve the Image**:\n   - Access the image using the generated URL before it expires.\n\n---\n\n## Repository Structure\n```plaintext\nephemeral-storage-worker/\n├── src/\n│   └── index.ts        # Cloudflare Worker code\n├── wrangler.toml       # Configuration for the Worker\n├── package.json        # Node.js dependencies\n├── tsconfig.json       # TypeScript configuration\n└── README.md           # Project documentation\n```\n\n---\n\n## Setup\n\n### Prerequisites\n- **Wrangler CLI**: Install the Cloudflare Workers CLI.\n  ```bash\n  npm install -g wrangler\n  ```\n- **Cloudflare Account**: Ensure you have a KV namespace created.\n\n### Installation\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/tyler-tee/ephemeral-image-storage.git\n   cd ephemeral-image-storage/ephemeral-storage-worker\n   ```\n\n2. Install dependencies:\n   ```bash\n   npm install\n   ```\n\n3. Update `wrangler.toml`:\n   - Add your KV namespace `id`:\n     ```toml\n     [[kv_namespaces]]\n     binding = \"ephemeral-image-storage\"\n     id = \"your-kv-namespace-id\"\n     ```\n\n---\n\n## Usage\n\n### Development\nRun the Worker locally:\n```bash\nwrangler dev\n```\n\n### Deployment\nPublish the Worker to Cloudflare:\n```bash\nwrangler publish\n```\n\n### API Endpoints\n1. **`POST /upload`**:\n   - Upload an image.\n   - Example:\n     ```bash\n     curl -X POST https://your-worker-url/upload --data-binary @test-image.png\n     ```\n   - Response:\n     ```json\n     {\n       \"url\": \"/image/{id}\",\n       \"expires\": 1698423000\n     }\n     ```\n\n2. **`GET /image/{id}`**:\n   - Retrieve an uploaded image using the provided `id`.\n   - Example:\n     ```bash\n     curl https://your-worker-url/image/{id} --output retrieved-image.png\n     ```\n\n---\n\n## License\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyler-tee%2Fephemeral-image-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyler-tee%2Fephemeral-image-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyler-tee%2Fephemeral-image-storage/lists"}