{"id":15591524,"url":"https://github.com/zhashkevych/s3-file-uploader","last_synced_at":"2025-07-09T07:04:13.743Z","repository":{"id":57544448,"uuid":"250582459","full_name":"zhashkevych/s3-file-uploader","owner":"zhashkevych","description":"Basic HTTP API for file uploading to S3-compatible storage","archived":false,"fork":false,"pushed_at":"2020-04-03T06:58:40.000Z","size":17,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-09T07:02:33.580Z","etag":null,"topics":[],"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/zhashkevych.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}},"created_at":"2020-03-27T16:15:33.000Z","updated_at":"2023-11-29T06:24:46.000Z","dependencies_parsed_at":"2022-09-16T23:01:39.329Z","dependency_job_id":null,"html_url":"https://github.com/zhashkevych/s3-file-uploader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zhashkevych/s3-file-uploader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhashkevych%2Fs3-file-uploader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhashkevych%2Fs3-file-uploader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhashkevych%2Fs3-file-uploader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhashkevych%2Fs3-file-uploader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhashkevych","download_url":"https://codeload.github.com/zhashkevych/s3-file-uploader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhashkevych%2Fs3-file-uploader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264411122,"owners_count":23603798,"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":[],"created_at":"2024-10-02T23:41:36.249Z","updated_at":"2025-07-09T07:04:13.719Z","avatar_url":"https://github.com/zhashkevych.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# File Uploading API (to S3 competible storage)  \n\n## \u003ca href=\"https://medium.com/@zhashkevych/api-%D0%BD%D0%B0-go-gin-gonic-%D0%B4%D0%BB%D1%8F-%D0%B7%D0%B0%D0%B3%D1%80%D1%83%D0%B7%D0%BA%D0%B8-%D1%84%D0%B0%D0%B9%D0%BB%D0%BE%D0%B2-99e3622a3d6a\"\u003eBlog Post\u003c/a\u003e\n\n## Requirements\n- go 1.14\n- docker \u0026 docker-compose\n\n## Run Project\n\n\nDue to localstack usage, ```awscli``` tool is needed for local development.\n\nInstall it on mac via ```brew install awscli```\n\nBefore running local project, run:\n```aws configure``` and set up AWS keys. Don't forget to add them to `docker-compose.yml`\nThen, set up bucket using folowing commands:\n\n`aws --endpoint-url=http://localhost:4572 s3 mb s3://file-storage`\n\n`aws --endpoint-url=http://localhost:4572 s3api put-bucket-acl --bucket file-storage --acl public-read` \n\nUse ```make run``` to build and run docker containers with application itself and mongodb instance\n\n## API:\n\n### POST /api/upload\n\nUsed to upload image for publication\n\n##### Input should be of type \"multipart/form-data\" with \"file\" as key to image: \n\n##### Example Response (Status 200 OK): \n```\n{\n    \"status\": \"ok\",\n    \"url\": \"http://localhost:4572/file-storage/XVlBzgbaiCMRAjWw\"\n}\n```\n\n##### Example Response (Status 400 Bad Request): \n```\n{\n    \"status\": \"error\",\n    \"url\": \"failed to open image\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhashkevych%2Fs3-file-uploader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhashkevych%2Fs3-file-uploader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhashkevych%2Fs3-file-uploader/lists"}