{"id":30067234,"url":"https://github.com/khofesh/img-upload-view","last_synced_at":"2025-08-08T08:10:34.491Z","repository":{"id":300010181,"uuid":"1004836369","full_name":"khofesh/img-upload-view","owner":"khofesh","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-19T12:10:53.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-19T12:30:00.972Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/khofesh.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,"zenodo":null}},"created_at":"2025-06-19T08:56:40.000Z","updated_at":"2025-06-19T12:10:57.000Z","dependencies_parsed_at":"2025-06-19T12:31:58.683Z","dependency_job_id":"c6e69551-22a8-4f3d-878f-515b93afac29","html_url":"https://github.com/khofesh/img-upload-view","commit_stats":null,"previous_names":["khofesh/img-upload-view"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/khofesh/img-upload-view","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khofesh%2Fimg-upload-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khofesh%2Fimg-upload-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khofesh%2Fimg-upload-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khofesh%2Fimg-upload-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khofesh","download_url":"https://codeload.github.com/khofesh/img-upload-view/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khofesh%2Fimg-upload-view/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269385800,"owners_count":24408433,"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","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-08-08T08:10:30.192Z","updated_at":"2025-08-08T08:10:34.482Z","avatar_url":"https://github.com/khofesh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# update load and view image services\n\n`compose.dev.yaml` is for dev\n\n`compose.yaml` is for prod (let's say it's prod)\n\n## selinux\n\n```shell\nsudo chgrp -R nogroup configs\nsudo chcon -Rt svirt_sandbox_file_t configs/\n```\n\n## development\n\ndocker and API service (terminal 1)\n\n```shell\n# docker compose\ndocker compose -f compose-dev.yaml up -d\n\nexport UPLOAD_DIR=\"./upload/\"\n\nmake run/api\n```\n\nfrontend (terminal 2)\n\n```shell\nexport VITE_API_URL=http://localhost:8080\ncd web\nnpm run dev\n```\n\nrequests\n\n```shell\ncurl -X POST http://localhost:8080/upload \\\n  -F \"image=@/path/to/your/image.jpg\" \\\n  -H \"Content-Type: multipart/form-data\"\n\n# get all images\ncurl -X GET http://localhost:8080/images\n\n# with limit and offset\ncurl -X GET \"http://localhost:8080/images?limit=5\u0026offset=0\"\n\n# next page\ncurl -X GET \"http://localhost:8080/images?limit=5\u0026offset=5\"\n\n# get image by ID\ncurl -X GET http://localhost:8080/images/1\n```\n\npsql\n\n```shell\npsql \"postgres://postgres:postgres@localhost:5432/app_db?sslmode=disable\"\n```\n\n## fake prod\n\n```shell\ndocker compose -f compose.yaml up --build # if \"localhost\" cannot be accessed, wait a bit\ndocker compose -f compose.yaml up -d\n```\n\n## generate dummy JPEG\n\n```shell\ncd dummy-jpeg\npython3 gen-dummy-jpeg.py\n```\n\ntest it on the webpage\n\n![error-more-than-10mb](./images/error-more-than-10mb.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhofesh%2Fimg-upload-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhofesh%2Fimg-upload-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhofesh%2Fimg-upload-view/lists"}