{"id":19212393,"url":"https://github.com/leafo/url2gs","last_synced_at":"2025-07-22T08:04:18.078Z","repository":{"id":17765093,"uuid":"20624862","full_name":"leafo/url2gs","owner":"leafo","description":"Command line tool to copy the contents of a HTTP URL to Google Cloud Storage","archived":false,"fork":false,"pushed_at":"2014-06-10T03:57:21.000Z","size":152,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-23T08:13:58.011Z","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/leafo.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":"2014-06-08T19:43:35.000Z","updated_at":"2023-07-25T13:52:07.000Z","dependencies_parsed_at":"2022-09-05T05:21:36.116Z","dependency_job_id":null,"html_url":"https://github.com/leafo/url2gs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leafo/url2gs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafo%2Furl2gs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafo%2Furl2gs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafo%2Furl2gs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafo%2Furl2gs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leafo","download_url":"https://codeload.github.com/leafo/url2gs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafo%2Furl2gs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266454858,"owners_count":23931348,"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-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":"2024-11-09T13:46:45.511Z","updated_at":"2025-07-22T08:04:18.021Z","avatar_url":"https://github.com/leafo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# url2gs\n\nUploads a file to Google Cloud storage from a HTTP URL.\n\nIf you just need a quick way to do it you can use the command line:\n\n```bash\ncurl -f http://leafo.net/hi.png | gsutil -h \"Content-Type:image/png\" cp -a public-read - gs://leafo/hi.png\n```\n\nBut if you want to handle HTTP status codes and limit the size of file that can\nbe uploaded then this tool is for you.\n\n\n## Usage\n\nInstall\n\n```bash\ngo get github.com/leafo/url2gs\n```\n\n```bash\n$ url2gs -help\nUsage: url2gs [OPTIONS] http://URL gs://BUCKET/KEY\n\nOptions:\n  -acl=\"public-read\": ACL of uploaded file\n  -config=\"url2gs.json\": Path to json config file\n  -content_disposition=\"\": Content disposition of uploaded file\n  -content_type=\"\": Content type of uploaded file (defaults to content type from HTTP request)\n  -max_bytes=0: Max bytes to copy (0 is no limit)\n\n```\n\nCreate a config file:\n\n`url2gs.json`:\n\n```json\n{\n  \"PrivateKeyPath\": \"path/to/service/key.pem\",\n  \"ClientEmail\": \"111111111111@developer.gserviceaccount.com\"\n}\n```\n\nRun:\n\n```bash\n$GOPATH/bin/url2gs -max_bytes=5000000 http://leafo.net/hi.png gs://leafo/hi.png\n```\n\nIf the command succeeds then an exit code of 0 is returend, on failure 1 is\nreturned. Only requests that return a 200 status code are copied. The mime type\nof the file is extracted from the `Content-Type` of the URL.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafo%2Furl2gs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleafo%2Furl2gs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafo%2Furl2gs/lists"}