{"id":31813990,"url":"https://github.com/levicook/upload-demo","last_synced_at":"2026-02-16T08:02:33.630Z","repository":{"id":17299141,"uuid":"20069593","full_name":"levicook/upload-demo","owner":"levicook","description":null,"archived":false,"fork":false,"pushed_at":"2014-05-23T01:21:29.000Z","size":196,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-15T09:13:19.766Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/levicook.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}},"created_at":"2014-05-22T17:04:01.000Z","updated_at":"2024-04-15T09:13:19.767Z","dependencies_parsed_at":"2022-07-26T16:32:04.500Z","dependency_job_id":null,"html_url":"https://github.com/levicook/upload-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/levicook/upload-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levicook%2Fupload-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levicook%2Fupload-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levicook%2Fupload-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levicook%2Fupload-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levicook","download_url":"https://codeload.github.com/levicook/upload-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levicook%2Fupload-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006754,"owners_count":26084148,"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-10-11T02:00:06.511Z","response_time":55,"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-10-11T08:23:24.449Z","updated_at":"2025-10-11T08:23:27.628Z","avatar_url":"https://github.com/levicook.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"upload-demo\n===========\n\n### Safely and efficiently upload, download and serve images over HTTP with Go and MongoDB.\n\nThis app demonstrates patterns we've found useful and trustworthy. YMMV.\n\n\n#### Topics:\n\nArchitecture\n* Stream all the things!\n\nRequest Routing\n\nAuthorization\n* Does this client have permission to create an image?\n\nValidation\n* Is this an image format we accept?\n* Is this upload too large?\n\n\n##### Request Routing\n\n\t\tMethod   | URL                        | Name           |\n\t\t-------- | ---                        | ----           |\n\t\tPOST     | /images                    | create_image   |\n\t\tGET      | /images/{imageId}          | show_image     |\n\t\tGET      | /images/{imageId}/download | image_download |\n\t\tGET      | /images/{imageId}/metadata | image_metadata |\n\n\n```bash\n$ curl localhost:9000/images -X POST --form \"file=@assets/minimal.pdf\"\nUnauthorized\n\n$ curl localhost:9000/images -X POST --form \"file=@assets/minimal.png\"\nUnauthorized\n\n$ curl localhost:9000/images -X POST --form \"file=@assets/minimal.png\" -H \"X-SECRET: sekret\"\n{\"id\":\"537ea1a8565c877315000001\",\"contentType\":\"image/png\",\"fileName\":\"minimal.png\",\"size\":8427,\"createdAt\":\"2014-05-22T19:17:28.404-06:00\"}\n\n$ curl localhost:9000/images/537ea1a8565c877315000001/metadata\n{\"id\":\"537ea1a8565c877315000001\",\"contentType\":\"image/png\",\"fileName\":\"minimal.png\",\"size\":8427,\"createdAt\":\"2014-05-22T19:17:28.404-06:00\"}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevicook%2Fupload-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevicook%2Fupload-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevicook%2Fupload-demo/lists"}