{"id":22423457,"url":"https://github.com/prantlf/go-upload-demo","last_synced_at":"2025-03-27T05:41:10.734Z","repository":{"id":150431668,"uuid":"312646400","full_name":"prantlf/go-upload-demo","owner":"prantlf","description":"Demonstrates how to make an optimal HTTP request with the multipart MIME message according in Go.","archived":false,"fork":false,"pushed_at":"2020-11-14T09:12:57.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-04-04T00:13:14.266Z","etag":null,"topics":["demo","file","file-upload","form-data","go","multipart","multipart-formdata","upload"],"latest_commit_sha":null,"homepage":"","language":"Go","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/prantlf.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":"2020-11-13T17:50:43.000Z","updated_at":"2024-06-19T07:51:55.156Z","dependencies_parsed_at":"2023-04-09T02:08:33.846Z","dependency_job_id":null,"html_url":"https://github.com/prantlf/go-upload-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgo-upload-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgo-upload-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgo-upload-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prantlf%2Fgo-upload-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prantlf","download_url":"https://codeload.github.com/prantlf/go-upload-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245791899,"owners_count":20672668,"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":["demo","file","file-upload","form-data","go","multipart","multipart-formdata","upload"],"created_at":"2024-12-05T18:11:25.148Z","updated_at":"2025-03-27T05:41:10.713Z","avatar_url":"https://github.com/prantlf.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-upload-demo\n\nDemonstrates how to make an optimal HTTP request with the multipart MIME message according to [RFC7578] in Go. It uploads a file including metadata to an echoing server, which just prints the request header and body on the console.\n\nThe best solutions for both chunked and sized (with content length) are [upload-composed-chunked] and [upload-composed-sized], which use a custom [multipart composer]. Other solutions use the standard [multipart writer].\n\nCommand line executables; see the descriptions pointed at by these links:\n\n* [serve-echo] - HTTP server, which just prints the request header and body on the console.\n* [upload-buffered] - reads the entire file to memory, posts the content length\n* [upload-piped-chunked] - streams the file using a pipe, does not post the content length\n* [upload-piped-sized] - streams the file using a pipe, posts the content length\n* [upload-composed-chunked] - streams the file using a reader, does not post the content length\n* [upload-composed-sized] - streams the file using a reader, posts the content length\n\nThe server and the uploading executables use [common parameters] and [common request \u0026 response handling] to make the testing easier.\n\n## Usage\n\nInstall Go and GNU Make. For example, on Mac:\n\n    brew install go make\n\nClone this repository and build the executable:\n\n    git clone https://github.com/prantlf/go-upload-demo.git\n    cd go-upload-demo\n    make\n\nRun the testing web server, which prints requests on the console, in the background:\n\n    ./serve-echo \u0026\n\nRun the testing clients, which use different techniques to send a multi-part form request:\n\n    ./upload-buffered\n    ./upload-piped-chunked\n    ./upload-piped-sized\n    ./upload-composed-chunked\n    ./upload-composed-sized\n\n[RFC7578]: https://tools.ietf.org/html/rfc7578\n[multipart composer]: https://pkg.go.dev/github.com/prantlf/go-multipart-composer\n[multipart writer]: https://golang.org/pkg/mime/multipart/#Writer\n[serve-echo]: cmd/serve-echo/serve-echo.md\n[upload-buffered]: cmd/upload-buffered/upload-buffered.md\n[upload-piped-chunked]: cmd/upload-piped-chunked/upload-piped-chunked.md\n[upload-piped-sized]: cmd/upload-piped-sized/upload-piped-sized.md\n[upload-composed-chunked]: cmd/upload-composed-chunked/upload-composed-chunked.md\n[upload-composed-sized]: cmd/upload-composed-sized/upload-composed-sized.md\n[common parameters]: internal/params/params.go\n[common request \u0026 response handling]: internal/requestor/requestor.go\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fgo-upload-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprantlf%2Fgo-upload-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprantlf%2Fgo-upload-demo/lists"}