{"id":23053704,"url":"https://github.com/component/s3","last_synced_at":"2025-08-15T04:31:01.033Z","repository":{"id":7403630,"uuid":"8734122","full_name":"component/s3","owner":"component","description":"Upload files to s3 from the client","archived":false,"fork":false,"pushed_at":"2016-02-17T01:16:00.000Z","size":39,"stargazers_count":45,"open_issues_count":4,"forks_count":16,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-07-03T18:59:30.766Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/component.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","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":"2013-03-12T17:40:05.000Z","updated_at":"2024-03-20T08:42:36.000Z","dependencies_parsed_at":"2022-09-18T00:51:38.963Z","dependency_job_id":null,"html_url":"https://github.com/component/s3","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/component/s3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fs3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fs3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fs3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fs3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/component","download_url":"https://codeload.github.com/component/s3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fs3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270523890,"owners_count":24600188,"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-08-15T02:00:12.559Z","response_time":110,"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":"2024-12-16T00:19:17.346Z","updated_at":"2025-08-15T04:31:00.798Z","avatar_url":"https://github.com/component.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# s3\n\n  S3 client upload library.\n\n## Installation\n\n    $ component install component/s3\n\n## Config\n\n  An `S3` global must be initialized with some configuration:\n\n  - `policy` - the base64 json policy\n  - `signature` - the policy signature\n  - `bucket` the bucket name\n  - `acl` ACL such as \"public-read\"\n  - `key` access key\n\n## Example\n\n```js\nvar Upload = require('s3');\nvar drop = require('drop-anywhere');\n\ndrop(function(err, drop){\n  if ('upload' != drop.type) return;\n  var file = drop.item.file;\n  console.log('upload %s', file.name);\n  var uid = Math.random() * 1e10 | 0;\n  var upload = Upload(file, { name: uid })\n\n  var prog = document.querySelector('#progress');\n  upload.on('progress', function(e){\n    prog.textContent = (e.percent | 0) + '%';\n  });\n\n  upload.end(function(err){\n    if (err) throw err;\n    console.log('upload complete %s', upload.name);\n    console.log(upload.url);\n  });\n});\n```\n\n## API\n\n### Upload(options)\n\n  - `name` remote filename or `file.name`\n  - `type` content-type or `file.type`\n\nEvents:\n\n  - `abort` upload was aborted\n  - `progress` upload in progress (`e.percent` etc)\n  - `end` upload is complete\n\n## Testing\n\n  First populate `./config.json` with your credentials:\n\n```json\n{\n  \"key\": \"asdfasdfasdfasdf\",\n  \"secret\": \"asdfasdfasdfasdfasdfadsfasfdsfdasdf+fHgg\",\n  \"bucket\": \"files.example.com\"\n}\n```\n\n  Boot the test server:\n\n```\n$ node test\n```\n\n## License\n\n  MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Fs3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomponent%2Fs3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Fs3/lists"}