Add File Upload to Your React App with Amplify - full tutorial

  Рет қаралды 9,595

Complete Coding - Master AWS Serverless

Complete Coding - Master AWS Serverless

Күн бұрын

Пікірлер: 44
@oscargm1979
@oscargm1979 2 жыл бұрын
Thank you so much.This is a really good playlist for anyone like me that want to start in AWS. Edit: BTW,bro if you want to avoid that warning about React advising you that you must choose between using 'controled components or uncontroled components' it is because you are dealing with an object and he cannot find song.title | song.owner,etc.Just initalize it: const [songData, setSongData] = useState({ title: '', owner: '', description: '', }); Now when you do this he know where to look and is not anymore an uncontroled component:
@CompleteCoding
@CompleteCoding 2 жыл бұрын
Thanks for the tip. I'm definitely not a FE Dev any more so I don't keep as up to date with it.
@joshuaunderwood1873
@joshuaunderwood1873 4 жыл бұрын
Haven't seen an upload in awhile, don't give up Sam.
@CompleteCoding
@CompleteCoding 4 жыл бұрын
I've been on holiday for 2 weeks and the internet was too poor to upload anything. I've literally got a video uploading now :) Thanks again for the support Joshua
@farhanfarooq
@farhanfarooq 4 жыл бұрын
Just started learning aws and watched this entire series in one go. Good content thank you. Let me scroll through other playlists in your channel :D
@CompleteCoding
@CompleteCoding 4 жыл бұрын
Glad it was helpful!
@khandoor7228
@khandoor7228 4 жыл бұрын
Hey Sam, I was really looking forward this and i was not disappointed! Thanks Sam!!
@CompleteCoding
@CompleteCoding 4 жыл бұрын
I'm really glad that it lived up to your expectations. Have you got any plans for something to build with what you've learnt?
@khandoor7228
@khandoor7228 4 жыл бұрын
@@CompleteCoding Hey Sam, Yeah I have some ideas for projects but right now I am trying to knock out some AWS certs. I really love developing in React so I am trying to keep those skills current / integrated with AWS and your channel really helps me a lot with doing that. Working on the job, working on Certs, keeping up on other dev skills and keeping up with the family is a lot right now, not enough hours in the day but I'm thankful for all of it!!!!! Any chance you can add an image to the song record? I saw your tutorial on adding images to an S3 bucket and it would just be combining the technique you showed in this video and that one but I think it would be great to see it done. There is usually a lot that goes into adding images, size limits, number of images ... etc. Generally it would be great to keep adding new features to this project. That would be awesome for me. Thanks for everything you do though, you are helping me a lot personally!!!
@CompleteCoding
@CompleteCoding 4 жыл бұрын
@@khandoor7228 Good effort keeping all that up. Yes you could. It would be an almost identical process to the one in this video but with an image instead of an mp3. You could then do processing on it afterwards like you mentioned. In terms of limiting what the user uploads as an image, it is often better to do that on the front end. You want to allow the user to decide how they want their image cropped. Scaling and compressing you could do on the front or back end.
@ShyamnaikGuguloth
@ShyamnaikGuguloth 4 жыл бұрын
Awesome video. Loved the way you explain things.
@CompleteCoding
@CompleteCoding 4 жыл бұрын
Thanks
@aditmodi
@aditmodi 3 жыл бұрын
great video sam. I want to implement a file storage application using aws s3. any guides/ materials on how I could do it???
@CompleteCoding
@CompleteCoding 3 жыл бұрын
You could do something very similar to what we've done in this video. If you want to show them all the files they have you can list them. docs.amplify.aws/lib/storage/list/q/platform/js
@lostmonster1097
@lostmonster1097 Жыл бұрын
Thank you so much. this video is usefull, can I ask a question? If I want to delete how can I do that? thanks a lot
@CompleteCoding
@CompleteCoding Жыл бұрын
If you look in the Amplify docs there should be a storage.delete method
@programmusicuk
@programmusicuk 4 жыл бұрын
LOVE IT! Works really well, very enjoyable tutorial. Putting another request in for transactional-based tutorials please Sam - googlePay /Stripe etc :)
@CompleteCoding
@CompleteCoding 4 жыл бұрын
Noted!
@saeidpm
@saeidpm 4 жыл бұрын
Thanks Sam, You are awesome By the way i have a suggestion for the alignment of the items inside the Paper component. You only need to apply a css class to all the div inside it as follows: .flexItem { flex: 25%; }
@CompleteCoding
@CompleteCoding 4 жыл бұрын
Thanks! I don't spend as much time on front end development any more so miss out on the newer CSS tricks.
@minyang3988
@minyang3988 4 жыл бұрын
Great video! I am just wondering how to sign in with facebook?
@CompleteCoding
@CompleteCoding 4 жыл бұрын
I'm looking at making a video covering that soon
@khandoor7228
@khandoor7228 4 жыл бұрын
Hey Sam, when creating an Amplify project is there any way to create it in a separate environment, either separate VPC or Organization or something? Im just thinking if I were to make several projects I would want to have some logical separation, especially for running metrics, alarms, costs all that sort of thing. I dont see that in any of the configuration steps. I guess i could add tags to the various components. I looked it up in the Amplify docs and didnt see anything.
@CompleteCoding
@CompleteCoding 4 жыл бұрын
Each lambda that you deploy has it's own set of metrics in AWS CloudWatch. You can configure alarms for individual lambdas or groups of them. For different environments, when you first set up Amplify you created it with a 'dev' environment. If you go into 'local-env-info.json' you can see the environment. If you create a dev, uat and prod branch you can have each of them deploy to a separate environment, creating new lambdas and database tables
@khandoor7228
@khandoor7228 4 жыл бұрын
@@CompleteCoding thanks very much Sam
@tylermorales9043
@tylermorales9043 3 жыл бұрын
💡 Quick Tip: Instead of implementing a conditional operator to render if a component exists, I've instead used the short-circuit (AND) operator to accomplish the same task: `{JS expression && `
@CompleteCoding
@CompleteCoding 3 жыл бұрын
Very nice. I don't do much front end dev any more so tips like that are great
@muhammadahsan3929
@muhammadahsan3929 Жыл бұрын
i have on question you created a storage and on uploading song you are not specifying storage (bucket) name. (if we have multiple). then how it came to know that you are uploading to that storage or bucket?
@Saptisunil
@Saptisunil 3 жыл бұрын
Heyy ! In the amplify storage i am storing the json files. So how can i display the contents in the json file using the fileAccessURL ? Can you help me with that ?
@CompleteCoding
@CompleteCoding 3 жыл бұрын
You can do a GET request with Axios to the URL and get the json as a response.
@case_tips
@case_tips 3 жыл бұрын
Hello, where does onUpload event come from? I couldn't find such event type in react.
@CompleteCoding
@CompleteCoding 3 жыл бұрын
on SongList line 110, I am passing the variable of "onUpload" into the AddSong component. I am passing in this function. () => { setShowAddNewSong(false); fetchSongs(); } I could have defined it as a named function "const upload = () => ..." an then passed that into the AddSong component
@case_tips
@case_tips 3 жыл бұрын
@@CompleteCoding Got it. Thank you so much
@dw2232
@dw2232 4 жыл бұрын
Is there a link for the source code to download? Thanks.
@CompleteCoding
@CompleteCoding 4 жыл бұрын
Here you go github.com/SamWSoftware/amplify-react-tutorial-project/tree/amplify-upload
@saipavandhulipudi2352
@saipavandhulipudi2352 3 жыл бұрын
when I try to upload the song I got the this error App.jsx:143 Uncaught (in promise) {data: null, errors: Array(1)}....pls help me anyone
@CompleteCoding
@CompleteCoding 3 жыл бұрын
try wrapping App.jsx:143 in a try/catch and then console.log the error. That should help you figure out the issue. Probably permissions or missing resources
@tylermorales9043
@tylermorales9043 3 жыл бұрын
I think you have to include all the data points (ex/ description, title, artist)
@ziranshuzhang6831
@ziranshuzhang6831 2 жыл бұрын
Amplify offers almost no flexibility, and the document is never stuck to the point, tedious and buggy, like every other AWS service. I would directly use AWS services if I have to stick with AWS, and if I can, I will just stay away from AWS.
@CompleteCoding
@CompleteCoding 2 жыл бұрын
I agree that Amplify is pretty limited. I'm surprised that you would want to avoid AWS completely though. What have you used that is buggy?
@ziranshuzhang6831
@ziranshuzhang6831 2 жыл бұрын
@@CompleteCoding That's not what I mean. Amplify is buggy and below standard. Other AWS services are normally great in functionality and pricing. But their document is constantly bad. All of them. I always end up spending more than twice of the time to achieve the same thing in AWS than GCP, and that's normally very unpleasant time, it normally involves going through 100 documents and links they have to finally get to what you want. And normally done with some help on Stackoverflow, instead of official document.
@CompleteCoding
@CompleteCoding 2 жыл бұрын
@@ziranshuzhang6831 Yeh, the AWS docs are pretty awful
@ShyamnaikGuguloth
@ShyamnaikGuguloth 4 жыл бұрын
Have few quiries, can you share your email id or social media links to contact... thanks
@CompleteCoding
@CompleteCoding 4 жыл бұрын
My email is in the about section of the channel
Customising Your Amplify Login - Extended Video
43:58
Complete Coding - Master AWS Serverless
Рет қаралды 9 М.
The Easiest Way to Work with S3 Files - AWS Amplify Storage Tutorial
27:56
Complete Coding - Master AWS Serverless
Рет қаралды 20 М.
1, 2, 3, 4, 5, 6, 7, 8, 9 🙈⚽️
00:46
Celine Dept
Рет қаралды 105 МЛН
这是自救的好办法 #路飞#海贼王
00:43
路飞与唐舞桐
Рет қаралды 138 МЛН
AWS Amplify (Gen 1) in Plain English | Getting Started Tutorial for Beginners
16:54
Tiny Technical Tutorials
Рет қаралды 57 М.
Image Upload API with AWS Lambda and S3 - Serverless Tutorial
28:45
Complete Coding - Master AWS Serverless
Рет қаралды 27 М.
Working with Data in DynamoDB from React with AWS Amplify - Full tutorial
43:10
Complete Coding - Master AWS Serverless
Рет қаралды 64 М.
AWS Amplify Fullstack Project Setup (React, Node, Lambda, REST API)
35:59
How is this Website so fast!?
13:39
Wes Bos
Рет қаралды 1 МЛН
Coding a FULL App with AI (You Won't Believe This)
15:19
Creator Magic
Рет қаралды 183 М.
ADD IMAGE RECOGNITION TO YOUR APP WITH ONE LINE OF CODE (using AWS Amplify)
17:01
AWS Amplify: Adding a RESTful backend to reactjs
21:34
Focus Otter
Рет қаралды 35 М.
7 Cybersecurity Tips NOBODY Tells You (but are EASY to do)
13:49
All Things Secured
Рет қаралды 803 М.
Junior vs Senior React Folder Structure - How To Organize React Projects
16:16
1, 2, 3, 4, 5, 6, 7, 8, 9 🙈⚽️
00:46
Celine Dept
Рет қаралды 105 МЛН