{"id":22823239,"url":"https://github.com/akofman/node-s3-extra","last_synced_at":"2025-04-23T03:49:11.261Z","repository":{"id":34043458,"uuid":"166062359","full_name":"akofman/node-s3-extra","owner":"akofman","description":"Convenient extra methods for the AWS.S3 service.","archived":false,"fork":false,"pushed_at":"2023-01-06T19:00:09.000Z","size":2993,"stargazers_count":2,"open_issues_count":15,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T03:49:06.014Z","etag":null,"topics":["aws","getobjectstream","nodejs","s3","upload"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/akofman.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":"2019-01-16T15:23:04.000Z","updated_at":"2023-03-10T07:28:27.000Z","dependencies_parsed_at":"2023-01-15T04:15:28.573Z","dependency_job_id":null,"html_url":"https://github.com/akofman/node-s3-extra","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/akofman%2Fnode-s3-extra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akofman%2Fnode-s3-extra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akofman%2Fnode-s3-extra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akofman%2Fnode-s3-extra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akofman","download_url":"https://codeload.github.com/akofman/node-s3-extra/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250366685,"owners_count":21418768,"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":["aws","getobjectstream","nodejs","s3","upload"],"created_at":"2024-12-12T16:16:03.089Z","updated_at":"2025-04-23T03:49:11.243Z","avatar_url":"https://github.com/akofman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-s3-extra [![Build Status](https://travis-ci.org/akofman/node-s3-extra.svg?branch=main)](https://travis-ci.org/akofman/node-s3-extra)\n\n\u003e Convenient extra methods for the AWS.S3 service.\n\n## Install\n\n    $ npm install s3-extra\n\n## Usage\n\n```js\nconst s3 = require('s3-extra')({ uploadConcurrency: 50 });\n\n// original s3 api services are still reachable\nvar params = { Bucket: 'bucket', Key: 'key', Body: stream };\ns3.putObject(params, (err, data) =\u003e {\n  console.log(err, data);\n});\n\n// plus some extra methods\n\ntry {\n  // retrieve an S3 object stream from its url\n  const objStream = s3.getObjectStream('s3://my-bucket/my/object/filename');\n\n  // upload a folder and keep the same hierarchy\n  await s3.uploadFileOrFolder('my/local/folder/path/', 's3://my-bucket/path/', {\n    ACL: 'public-read'\n  });\n\n  // or just upload a file\n  await s3.uploadFileOrFolder(\n    'my/local/folder/path/file.txt',\n    's3://my-bucket/path/'\n  );\n} catch (err) {\n  throw err;\n}\n```\n\n## API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n#### Table of Contents\n\n- [getObjectStream](#getobjectstream)\n  - [Parameters](#parameters)\n- [uploadFileOrFolder](#uploadfileorfolder)\n  - [Parameters](#parameters-1)\n\n### getObjectStream\n\nRetrieves objects from Amazon S3.\n\n#### Parameters\n\n- `s3Url` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a valid s3 url reprensenting the location of the object to get.\n- `params` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the same params as the AWS [getObject](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#getObject-property) method are accepted. (optional, default `{}`)\n\nReturns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** a stream object.\n\n### uploadFileOrFolder\n\nUploads a file or a folder to an Amazon S3 bucket.\n\n#### Parameters\n\n- `contentPath` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a path to a file or a folder to upload.\n- `s3Url` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a valid s3 url representing the location to put the content.\n- `params` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** the same params as the AWS [upload](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#upload-property) method are accepted. (optional, default `{}`)\n\nReturns **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** a promise.\n\n## License\n\nMIT Licensed. Copyright (c) Alexis Kofman 2019.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakofman%2Fnode-s3-extra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakofman%2Fnode-s3-extra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakofman%2Fnode-s3-extra/lists"}