{"id":24110407,"url":"https://github.com/kometen/http_post","last_synced_at":"2025-05-13T00:35:55.169Z","repository":{"id":141923405,"uuid":"95607981","full_name":"kometen/http_post","owner":"kometen","description":"Simple REST upload that accepts a jpeg file and convert it to heic format.","archived":false,"fork":false,"pushed_at":"2022-05-27T10:52:41.000Z","size":9,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T05:11:11.519Z","etag":null,"topics":["curl","golang","heic","heif","jpeg","rest-api"],"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/kometen.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":"2017-06-27T23:03:07.000Z","updated_at":"2022-09-14T01:31:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"4104e8ce-ae8d-40e9-a691-2ca4981eeed2","html_url":"https://github.com/kometen/http_post","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/kometen%2Fhttp_post","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kometen%2Fhttp_post/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kometen%2Fhttp_post/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kometen%2Fhttp_post/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kometen","download_url":"https://codeload.github.com/kometen/http_post/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253850544,"owners_count":21973662,"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":["curl","golang","heic","heif","jpeg","rest-api"],"created_at":"2025-01-11T01:15:00.927Z","updated_at":"2025-05-13T00:35:55.148Z","avatar_url":"https://github.com/kometen.png","language":"Go","readme":"# http_post\nSimple REST upload that accepts a jpeg file and convert it to heic format.\n\nWriting REST in go is surprisingly simple. The upload part is almost entirely based\non https://github.com/golang-samples/http/blob/master/fileupload/main.go.\n\nThe conversion part is taken from\nhttp://jpgtoheif.com/ and this is written by Ben Gotow (https://github.com/bengotow).\n\nStackOverflow is very handy when I need help writing json at https://stackoverflow.com/a/24356483/319826.\n\nExample converting file to heic format using curl. Open a Terminal window and copy and paste the command\nbelow, change the filename after the @-sign.\n\n```\ncurl -OLJs -F \"file=@_7D_8286.JPG\" \"http://46.101.99.187:8080/upload\"\n```\n\nIf the file is located in the Pictures-folder and is called IMG_0906.JPG the command is\n\n```\ncurl -OLJs -F \"file=@Pictures/IMG_0906.JPG\" \"http://46.101.99.187:8080/upload\"\n```\n\nIf you have more than one file the following loop works (in bash and zsh):\n\n```\nfor f in *.jpg; do\n  echo ${f}\n  curl -OLJs -F \"file=@${f}\" \"http://46.101.99.187:8080/upload\"\ndone\n```\n\nO tells curl to download the file, otherwise it will just display it at the command line.\u003cbr\u003e\nL tells curl to follow redirects.\u003cbr\u003e\nJ tells curl to save the file using the remote header name.\u003cbr\u003e\ns tells curl to be silent.\u003cbr\u003e\nF tells curl what file you want to upload.\n\nGive it a minute or two after the file have been uploaded. When it is uploaded and converted a http redirect 303\nGET's the converted file with the same name as the original but with the heic extension.\n\nThe converter also handles png-files.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkometen%2Fhttp_post","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkometen%2Fhttp_post","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkometen%2Fhttp_post/lists"}