{"id":22174626,"url":"https://github.com/iamnator/imagecache","last_synced_at":"2026-04-20T13:34:31.503Z","repository":{"id":136408375,"uuid":"504420741","full_name":"IamNator/imageCache","owner":"IamNator","description":"An Ephemeral server with a CLI tool for storing images (jpg, gif, png).","archived":false,"fork":false,"pushed_at":"2022-06-20T13:03:24.000Z","size":28867,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T22:46:49.383Z","etag":null,"topics":["file-upload","filesharing","golang","grpc"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IamNator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-06-17T06:34:10.000Z","updated_at":"2022-06-19T16:45:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"3dba81c4-2e1b-4a83-b5f0-4fd7939c2eed","html_url":"https://github.com/IamNator/imageCache","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamNator%2FimageCache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamNator%2FimageCache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamNator%2FimageCache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IamNator%2FimageCache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IamNator","download_url":"https://codeload.github.com/IamNator/imageCache/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245325221,"owners_count":20596818,"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":["file-upload","filesharing","golang","grpc"],"created_at":"2024-12-02T07:52:02.641Z","updated_at":"2026-04-20T13:34:26.470Z","avatar_url":"https://github.com/IamNator.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# imageCache\n\n\u003cimg width=\"351\" alt=\"imageCache\" src=\"https://user-images.githubusercontent.com/43158886/174594291-3ac69d76-f377-474c-8bec-2322924e4052.png\"\u003e\n\u003cimg src=\"https://github.com/thanos-io/thanos/workflows/CI/badge.svg\" alt=\"CI\" style=\"max-width: 100%;\"\u003e\n\n## REFERENCES   \n###### https://docs.buf.build\n###### A modification of the code from https://github.com/rickslick/grpcUpload\n\n```markdown\nimageCache can be used a CLI tool and a Server.  \nThe CLI tool uploads files concurrently using grpc to a server instance of the application.\n\nIf the server is spurned in a container  \nIt is Ephemeral, meaning, all data is erased once the container shuts down.  \nTo prevent this, you can make use of volumes. \n``` \n\n###### by default: all uploaded images are stored in \u003cb\u003e/app/data/files\u003c/b\u003e \n\n---\n###### Featues :\n* concurrent multi file upload using grpc with concept of chunking\n* supports tls (both client and sever )\n* Displays progress for each file\n* Exposes endpoints for file downloads\n* Exposes endpoint that return list of files of uploaded\n---\n###### How it works\n\n\u003cimg width=\"285\" align=\"left\" style=\"margin-right: 14px; margin-top: 7px;\"  alt=\"Screenshot 2022-06-19 at 13 20 11\" src=\"https://user-images.githubusercontent.com/43158886/174480621-7c487cf7-8eac-46e5-a945-79fc79eb966b.png\"\u003e\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\u003ci\u003eServer Exposes GRPC and REST apis\u003c/i\u003e\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\u003ci\u003eCLI communicates with the grpc server from a terminal\u003c/i\u003e\n\u003cbr clear=\"left\"/\u003e\n\u003cbr\u003e\n\n---\n\n## Quick Start\n\n\n#### 1. spin off server\n```shell\ngo run cmd/server/main.go\n```\n[more ...](./cmd/server/README.md)\n\n#### 2. upload a file\n```shell\ngo run cmd/client/main.go upload 127.0.0.1:4000 -f ./testdata/sample23.png\n```\n[more ...](./cmd/cli/README.md)\n\n---\n![Quick Start](https://user-images.githubusercontent.com/43158886/174492721-e00e44ca-5b85-4f1f-81da-1bccbf51b199.gif)\n---\n\n### Working with Container (e.g Docker)  \n\u003cbr\u003e\n\n#### 1. Build Docker container\n```shell\ndocker build . -t \u003cImageTagName\u003e imageCache\n\ne.g docker build . -t imageCache\n```\noutput:\n```shell\nmac@macs-MBP imageCache % docker build . -t imageCache          \n[+] Building 116.0s (8/11)                                                                                                                                                  \n =\u003e [internal] load build context                                                                                                                                      2.0s\n =\u003e =\u003e transferring context: 51.91kB                                                                                                                                   1.6s\n =\u003e [builder 1/4] FROM docker.io/library/golang:1.18-alpine@sha256\n ...\n```\n\n\u003cbr\u003e\n\n#### 2. Run Container (locally)\n\n```shell\ndocker run --env-file .env -p 9900:\u003cGRPC_PORT\u003e -p 7700:\u003cREST_PORT\u003e  \u003cImageTagName\u003e\n\ne.g  docker run --env-file .env -p 9900:9900 -p 7700:7700 server  \n```\n\noutput:\n```shell\nmac@macs-MBP imageCache %  docker run --env-file .env -p 9900:9900 -p 7700:7700 server\n[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.\n\n[GIN-debug] [WARNING] Running in \"debug\" mode. Switch to \"release\" mode in production.\n - using env:   export GIN_MODE=release\n - using code:  gin.SetMode(gin.ReleaseMode)\n\n[GIN-debug] GET    /data/files/:fileName     --\u003e imageCache/delivery/server.DownloadFileHandler (3 handlers)\n[GIN-debug] GET    /list                     --\u003e imageCache/delivery/server.ListFilesHandler (3 handlers)\n======\u003e we are running REST APIs @ :9900\n=========\u003e We are running GRPC APIs @ 127.0.0.1:7700\n\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamnator%2Fimagecache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamnator%2Fimagecache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamnator%2Fimagecache/lists"}