Gathering detailed insights and metrics for react-upload-to-s3
Gathering detailed insights and metrics for react-upload-to-s3
Gathering detailed insights and metrics for react-upload-to-s3
Gathering detailed insights and metrics for react-upload-to-s3
react-aws-s3-typescript
Open source npm package to upload your files into AWS S3 Bucket directly using react(typescript template)
react-aws-s3
Open Source Module to Upload your Media and files into AWS S3 Bucket directly from Front-end React.
s3-spa-upload
Upload a single page application to S3 with the right content-type and cache-control meta-data
react-image-upload-s3
A React component that renders an image input and uploads to an S3 bucket. Optionally can perform resizing and compressing of the image.
npm install react-upload-to-s3
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (99.77%)
CSS (0.23%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
9 Stars
24 Commits
8 Forks
2 Watchers
1 Branches
3 Contributors
Updated on Feb 24, 2025
Latest Version
1.0.16
Package Id
react-upload-to-s3@1.0.16
Unpacked Size
406.01 kB
Size
70.98 kB
File Count
7
NPM Version
8.11.0
Node Version
16.15.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
6
1
21
The all-in-one react-only component for uploading images, documents and videos to AWS S3. This is a pure front-end component and only requires AWS configuration at the backend, no backend code is necessary.
1npm install --save react-upload-to-s3
Then install the dependencies
1npm install --save aws-sdk 2npm install --save bootstrap 3npm install --save react-bootstrap 4npm install --save react-bootstrap-icons 5npm install --save react-ui-components-superflows 6npm install --save react-ui-themes-superflows
1 2import React from 'react' 3 4import Themes from 'react-ui-themes-superflows' 5import { Col, Row, Container } from 'react-bootstrap'; 6import { UploadToS3 } from 'react-upload-to-s3' 7import 'bootstrap/dist/css/bootstrap.min.css'; 8 9const App = () => { 10 11 const theme = Themes.getTheme("Default"); 12 13 return ( 14 <Container className='mt-5'> 15 <Row className='justify-content-center'> 16 17 <Col sm={12} xs={12} md={6} xxl={6}> 18 <UploadToS3 19 bucket="myuploads" 20 awsRegion="awsRegion" 21 awsKey="awsAccessKey" 22 awsSecret="awsSecret" 23 awsMediaConvertEndPoint="https://*********.mediaconvert.<awsRegion>.amazonaws.com" 24 type="image" 25 mediaConvertRole="mediaconvert_role" 26 theme={theme} 27 showNewUpload={false} 28 onResult={(result) => {console.log('on Result', result);}} /> 29 </Col> 30 31 </Row> 32 </Container> 33 ); 34 35} 36 37export default App 38
1 2import React from 'react' 3 4import Themes from 'react-ui-themes-superflows' 5import { Col, Row, Container } from 'react-bootstrap'; 6import { UploadToS3 } from 'react-upload-to-s3' 7import 'bootstrap/dist/css/bootstrap.min.css'; 8 9const App = () => { 10 11 const theme = Themes.getTheme("Default"); 12 13 return ( 14 <Container className='mt-5'> 15 <Row className='justify-content-center'> 16 17 <Col sm={12} xs={12} md={6} xxl={6}> 18 <UploadToS3 19 bucket="myuploads" 20 awsRegion="awsRegion" 21 cognitoIdentityCredentials={{ 22 IdentityPoolId: 'awsRegion:poolId', 23 }} 24 awsKey="" 25 awsSecret="" 26 awsMediaConvertEndPoint="https://*********.mediaconvert.<awsRegion>.amazonaws.com" 27 type="image" 28 mediaConvertRole="mediaconvert_role" 29 theme={theme} 30 showNewUpload={false} 31 onResult={(result) => {console.log('on Result', result);}} /> 32 </Col> 33 34 </Row> 35 </Container> 36 ); 37 38} 39 40export default App 41
1{ 2 "Version": "2012-10-17", 3 "Statement": [ 4 { 5 "Sid": "PublicListGet", 6 "Effect": "Allow", 7 "Principal": "*", 8 "Action": [ 9 "s3:List*", 10 "s3:Get*" 11 ], 12 "Resource": [ 13 "arn:aws:s3:::myuploads", 14 "arn:aws:s3:::myuploads/*" 15 ] 16 } 17 ] 18}
1[ 2 { 3 "AllowedHeaders": [ 4 "*" 5 ], 6 "AllowedMethods": [ 7 "PUT", 8 "POST", 9 "DELETE", 10 "GET" 11 ], 12 "AllowedOrigins": [ 13 "*" 14 ], 15 "ExposeHeaders": [] 16 } 17]
AWS mediaconvert is required for video processing. The clip selection happens at the client end, whereas the actual clipping is done by an AWS mediaconvert job. This requires a region specific endpoint and can be easily obtained from the aws cli (aws commandline).
1aws mediaconvert describe-endpoints --region <region>
Remember that this region specific endpoint also has to be provided as a prop to the upload-to-s3 component. (Refer to the Usage Section)
You will also have to create a mediaconvert role.
1 2{ 3 "Version": "2012-10-17", 4 "Statement": [ 5 { 6 "Effect": "Allow", 7 "Action": [ 8 "s3:*", 9 "s3-object-lambda:*" 10 ], 11 "Resource": "arn:aws:s3:::myuploads" 12 } 13 ] 14} 15
1{ 2 "Version": "2012-10-17", 3 "Statement": [ 4 { 5 "Sid": "VisualEditor0", 6 "Effect": "Allow", 7 "Action": [ 8 "iam:GetRole", 9 "iam:PassRole" 10 ], 11 "Resource": "arn:aws:iam::mediaconvert_role_id:role/*" 12 }, 13 { 14 "Sid": "VisualEditor1", 15 "Effect": "Allow", 16 "Action": "mediaconvert:*", 17 "Resource": "*" 18 }, 19 { 20 "Sid": "VisualEditor2", 21 "Effect": "Allow", 22 "Action": "iam:ListRoles", 23 "Resource": "*" 24 } 25 ] 26} 27
Once you are through with installing the dependencies and the AWS configuration, using the component becomes fairly simple. Please refer to the Usage above.
MIT © superflows-dev
No vulnerabilities found.
No security vulnerabilities found.