{"id":27767903,"url":"https://github.com/nimperx/react-aws-s3-typescript","last_synced_at":"2025-09-09T21:47:49.718Z","repository":{"id":49758403,"uuid":"324460980","full_name":"NimperX/react-aws-s3-typescript","owner":"NimperX","description":"Open source npm package to upload your files into AWS S3 Bucket directly using react(typescript template)","archived":false,"fork":false,"pushed_at":"2024-10-29T15:55:55.000Z","size":650,"stargazers_count":11,"open_issues_count":4,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-17T04:37:52.247Z","etag":null,"topics":["aws","aws-s3","javascript","s3","s3-bucket","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-aws-s3-typescript","language":"TypeScript","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/NimperX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":"NimperX"}},"created_at":"2020-12-26T01:29:32.000Z","updated_at":"2025-04-14T00:19:02.000Z","dependencies_parsed_at":"2024-06-19T10:02:07.114Z","dependency_job_id":"2d17de3a-1176-40f0-b2e0-bd5c58109765","html_url":"https://github.com/NimperX/react-aws-s3-typescript","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"9e92ff506647fc05268f8cefd6243fbeb10ee8eb"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/NimperX/react-aws-s3-typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NimperX%2Freact-aws-s3-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NimperX%2Freact-aws-s3-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NimperX%2Freact-aws-s3-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NimperX%2Freact-aws-s3-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NimperX","download_url":"https://codeload.github.com/NimperX/react-aws-s3-typescript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NimperX%2Freact-aws-s3-typescript/sbom","scorecard":{"id":101813,"data":{"date":"2025-08-11","repo":{"name":"github.com/NimperX/react-aws-s3-typescript","commit":"495d1734bb0a2a2712d78994b70c069dd3e28b3d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 1/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/NimperX/.github/SECURITY.md:1","Info: Found linked content: github.com/NimperX/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/NimperX/.github/SECURITY.md:1","Info: Found text in security policy: github.com/NimperX/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-15T10:17:53.888Z","repository_id":49758403,"created_at":"2025-08-15T10:17:53.888Z","updated_at":"2025-08-15T10:17:53.888Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274367688,"owners_count":25272301,"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-09-09T02:00:10.223Z","response_time":80,"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":["aws","aws-s3","javascript","s3","s3-bucket","typescript"],"created_at":"2025-04-29T19:54:56.486Z","updated_at":"2025-09-09T21:47:49.696Z","avatar_url":"https://github.com/NimperX.png","language":"TypeScript","funding_links":["https://github.com/sponsors/NimperX","https://www.buymeacoffee.com/nimper"],"categories":[],"sub_categories":[],"readme":"# react-aws-s3-typescript\n\nOpen source npm package to upload your files into AWS S3 Bucket directly using react(typescript template)\n\n\u003ca href=\"https://www.buymeacoffee.com/nimper\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Features](#features)\n- [Installing](#installing)\n- [Example](#example)\n    - [Upload a file to AWS S3 Bucket](#upload-a-file-to-aws-s3-bucket)\n    - [Delete a file from AWS S3 Bucket](#delete-a-file-from-aws-s3-bucket)\n- [S3 Config](#s3-config)\n- [Credits](#credits)\n- [License](#license)\n\n\n## Introduction\n\nOpen source npm package to upload your media and other types of files directly into AWS S3 Bucket using react typescript template. You can upload and retrive the public url for the file and delete the files if needed.\n\nYou need to have an AWS account to use AWS S3 Bucket. If you already do not have an account, create an account [here](https://console.aws.amazon.com).\n\nReadmore about AWS S3 buket: [https://docs.aws.amazon.com/s3/index.html](https://docs.aws.amazon.com/s3/index.html)\n\n## Features\n\n- Upload files to S3 bucket and retrive the public url\n- Delete files from S3 bucket\n\n## Installing\n\nUsing npm\n\n```bash\n$ npm install react-aws-s3-typescript\n```\n\n## Example\n\n### Upload a file to AWS S3 Bucket\n\nYou can define a default directory for uploads using the s3Config object\n\n```typescript\n    /* AWS S3 config options */\n    /* Highly recommended to declare the config object in an external file import it when needed */\n\n    /* s3Config.ts */\n\n    export const s3Config = {\n        bucketName:  'bucket-name',\n        dirName: 'directory-name',      /* Optional */\n        region: 'ap-south-1',\n        accessKeyId:'ABCD12EFGH3IJ4KLMNO5',\n        secretAccessKey: 'a12bCde3f4+5GhIjKLm6nOpqr7stuVwxy8ZA9bC0',\n        s3Url: 'https:/your-aws-s3-bucket-url/'     /* Optional */\n    }\n\n    /* End of s3Config.ts */\n```\n\n```typescript\n    /* AWS S3 Client */\n    /* uploadFile.ts */\n    import ReactS3Client from 'react-aws-s3-typescript';\n    import { s3Config } from './s3Config.ts';\n\n    const uploadFile = async () =\u003e {\n        /* Import s3 config object and call the constrcutor */\n        const s3 = new ReactS3Client(s3Config);\n\n        /* You can use the default directory defined in s3Config object\n        * Or you can a define custom directory to upload when calling the\n        * constructor using js/ts object destructuring.\n        * \n        * const s3 = new ReactS3Client({\n        *      ...s3Config,\n        *      dirName: 'custom-directory'\n        * });\n        * \n        */\n\n        const filename = 'filename-to-be-uploaded';     /* Optional */\n\n        /* If you do not specify a file name, file will be uploaded using uuid generated \n        * by short-UUID (https://www.npmjs.com/package/short-uuid)\n        */\n\n        try {\n            const res = await s3.uploadFile(file, filename);\n\n            console.log(res);\n            /*\n            * {\n            *   Response: {\n            *     bucket: \"bucket-name\",\n            *     key: \"directory-name/filename-to-be-uploaded\",\n            *     location: \"https:/your-aws-s3-bucket-url/directory-name/filename-to-be-uploaded\"\n            *   }\n            * }\n            */\n        } catch (exception) {\n            console.log(exception);\n            /* handle the exception */\n        }\n    }\n\n    /* End of uploadFile.ts */\n```\n\n### List files of a AWS S3 Bucket\n\n```typescript\n    /* AWS S3 Client */\n    /* listFiles.ts */\n    import ReactS3Client from 'react-aws-s3-typescript';\n    import { s3Config } from './s3Config.ts';\n\n    const listFiles = async () =\u003e {\n        /* Import s3 config object and call the constrcutor */\n        const s3 = new ReactS3Client(s3Config);\n\n        try {\n            const fileList = await s3.listFiles();\n\n            console.log(fileList);\n            /*\n            * {\n            *   Response: {\n            *     message: \"Objects listed succesfully\",\n            *     data: {                   // List of Objects\n            *       ...                     // Meta data\n            *       Contents: []            // Array of objects in the bucket\n            *     }\n            *   }\n            * }\n            */\n        } catch (exception) {\n            console.log(exception);\n            /* handle the exception */\n        }\n    }\n\n    /* End of listFiles.ts */\n```\n\n### Delete a file from AWS S3 Bucket\n\n```typescript\n    /* AWS S3 Client */\n    /* deleteFile.ts */\n    import ReactS3Client from 'react-aws-s3-typescript';\n    import { s3Config } from './s3Config.ts';\n\n    const deleteFile = async () =\u003e {\n        /* Import s3 config object and call the constrcutor */\n        const s3 = new ReactS3Client(s3Config);\n\n        /* Define the filepath from the root of the bucket to the file to be deleted */\n        const filepath = 'directory-name/filename-to-be-deleted';\n\n        try {\n            await s3.deleteFile(filepath);\n\n            console.log('File deleted');\n        } catch (exception) {\n            console.log(exception);\n            /* handle the exception */\n        }\n    }\n\n    /* End of deleteFile.ts */\n```\n\n__Important :__ Add `public-read` Canned ACL to the bucket to grant the public read access for files.\n\nRead more: [https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl)\n\n## S3 Config\n\nThese are the available config options for calling the S3 constructor `bucketName`, `region`, `accessKeyId` and `secretAccessKey` are required. Upload will default to __root path__, if `dirName` is not specified.\n\n## Credits\n\nThis `react-aws-s3-typescript` package is heavily inspired by the [`react-aws-s3`](https://www.npmjs.com/package/react-aws-s3) package provided by [developer-amit](https://www.npmjs.com/~developer-amit).\n\n## License\n\nReleased under [__MIT license__](https://opensource.org/licenses/MIT).\n\n[Back to top](#table-of-contents)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnimperx%2Freact-aws-s3-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnimperx%2Freact-aws-s3-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnimperx%2Freact-aws-s3-typescript/lists"}