Storing S3 Bucket Image URLs in MongoDB using Multer, NodeJS

Описание к видео Storing S3 Bucket Image URLs in MongoDB using Multer, NodeJS

Learn to setup an AWS S3 bucket, generate API keys to access the bucket, using multer to upload images to S3, storing the returned URL in a database like MongoDB and sending a response consisting the URL back to the client.

In the very last two videos we made the frontend, setup our backend server and connected to MongoDB.

This is the last video of the series and here we will basically setup our S3 bucket, generate API keys, use libraries like aws-sdk, multer, multer-S3 to upload the cropped / edited image (that we receive from our frontend) to our S3 bucket. We will also store the returned S3 URL in MongoDB which we then send back to the client and use it to display the uploaded image as an avatar.

------------------

Timestamps -

0:00 Intro
1:10 Installing multer, multer-S3 and aws-sdk
2:13 Setting up S3 bucket and generating API keys
4:45 Storing API keys as environment variables
6:15 Connecting to S3 bucket
7:45 Using multer to upload files to S3
15:30 Generating unique filenames using timestamps
17:35 Creating MongoDB collection Schema
18:49 Storing the image URL in MongoDB collection
20:39 Making S3 bucket public
22:35 Sending image URL as response back to client
23:10 Setting the image URL as our Avatar
23:20 Make a Spinner appear when uploading image
27:10 Conclusion

------------------

⚪ Part 1 ➡    • (#1 Frontend) Profile Image Upload to...  
⚪ Part 2 ➡    • (#2 Backend) Profile Image Upload to ...  

⚪ Starter Files ➡ https://github.com/manishboro/image-c...
⚪ Final Files ➡ https://github.com/manishboro/image-c...

⚪ Crop, Zoom and Download images in React ➡    • Crop, Zoom and Download images in Rea...  

------------------

Follow me -
⚪ Instagram ➡   / manish_boro  
⚪ LinkedIn ➡   / manish-boro-692b16198  

------------------

My PC Specifications -
⚪ Graphic Card ➡ GALAX RTX 2060 https://amzn.to/3hmSsCZ
⚪ RAM ➡ HyperX Fury 8GB 3200MHz * 2 https://amzn.to/3k3Pc17
⚪ Processor ➡ Ryzen 5 3600 https://amzn.to/2FkQzd0
⚪ CPU Cooler ➡ CoolerMaster H410R https://amzn.to/3hql7rb
⚪ Motherboard ➡ MSI B450 Tomahawk Max https://amzn.to/2Fq10f6

https://amzn.to/3NZRChL

** All the above mentioned links are affiliate links **

#webdevelopment #programming #coding #nextjstutorial #reactjs #multer

Комментарии

Информация по комментариям в разработке