Next.js 13 Full Stack E-commerce App #18 | Update Profile, Upload Avatar, Update next-auth Session
Вставка
- Опубліковано 5 сер 2024
- Git Repo Link:
github.com/ghulamabbas2/buyit...
Checkout my In-Depth Next.js Masterclass on Udemy Courses:
www.udemy.com/course/nextjs-b...
Next.js 13 Authentication with Next-Auth:
• Next.js Authentication...
================================================================
⚙️ Gadgets I use for Recording:
💻 Laptop - Macbook PRO M1 - 16/512
amzn.to/4eUqrSe
🎤 MIC - Samson Technologies Q2U USB/XLR Dynamic Microphone
amzn.to/3W9Z4wl
🖱️Mouse - Logitech G402 Gaming Mouse Hyperion Fury USB, Black
amzn.to/3RY4xUy
⌨️ Keyboard - Logitech K380 Multi-Device Bluetooth Keyboard
amzn.to/3RY4Fn0
🖥️ Monitor - UltraSharp 24-Inch Screen Led-Lit Monitor (U2419H)
amzn.to/4bxidN6
================================================================
In this tutorial video, we'll be continuing our development of a full-stack e-commerce app using Next.js 13. In this episode, we'll be focusing on updating user profiles and allowing users to upload avatars. We'll also be diving into how to update the user session using next-auth.
Throughout the video, we'll walk you through the step-by-step process of implementing these features, providing helpful tips and explanations along the way. By the end of this tutorial, you'll have a better understanding of how to handle user data and sessions within your Next.js 13 e-commerce application.
If you're looking to enhance your Next.js development skills, or simply want to learn more about building e-commerce apps, then this tutorial is perfect for you. Don't forget to subscribe to our channel for more helpful videos like this one!
This is probable the best full stack series I have ever seen!!!
Thanks again mate. This course is really good.
Awesome, yet again x
Hi Abbas, you're on the right track, keep going, bro!
Thank you, I will
nice work. I hope you made video about refresh token
the session?update nextauth api work properly local level but in production level when user logout profile then update profile
you are not passing the cookie in headers, then how is it working?
@codingwithabbas can you upload video how to update profile pic using nextjs 13.4 app router. Facing difficulty, didn't get any solution till now... Put request
Sir, i am getting undefined req.body in my controller when submitting the formData with avatar in spite of using api config bodyParser set to false.. I just got stuck with this problem plz help me
Have you used the multer middleware?
@@codingwithabbas no sir i am not using multer middleware. I am direct pushing the formdata in the controller inside the req body just like we did in the react mern stack app. I am also ur udemy student
If possible can you try uploading thrice a week
The course will be wrapped up soon, I will try to record long videos.
How many videos are remaining from now ?
Around 12
This is not the right approach to write code. You have only written the code, no testing, no checking, no debugging. To be a good coder, you must check the code on each block.
what is your problem sir?? nobody here said theyre good coder
Windows Users will get an error when trying to upload the image like ENOENT: no such file or directory .? to fix this
use cb(null, new Date().toISOString().replace(/:/g, '-') + file.originalname); in multer.js file
you have to add .replace(/:/g,'-')
can you write the full code
@@himayukhan4659
const storage = multer.diskStorage({
destination: function (req, file, cb) {
cb(null, "public/uploads");
},
filename: function (req, file, cb) {
cb(null, new Date().toISOString().replace(/:/g, '-') + file.originalname);
},
});
@@DipsNohawar thanks a lot it worked
Hi Abbas, thanks for the great video tutorials. In this tutorial, when trying to change the profile image, I get an error - ENOENT: no such file or directory, open 'C:\Users\Gintaras\Desktop|\..........\public\uploads\2023-04-21T06 :36:40.367Z-testimage.png
Is the image in the folder?
@@codingwithabbas No
bro I have the same issue have u already solved it?
when submit, i got this error
message: "ENOENT: no such file or directory, open 'C:\\Users\\Abdur Rahim\\Desktop\\ecommerce_tailwin\\public\\uploads\\2023-04-10T08:25:41.713Z-product page gym.png'"
success: false
Check in the folder do you have the file or not.
@@codingwithabbas no file save in this upload folder
remove new Date()
and it's working
hello sir.. i got same error too, and i change your code and thats work for me.. can i fixed this code??
const storage = multer.diskStorage({
destination: function (req, file, cb) {
cb(null, "public/uploads");
},
filename: function (req, file, cb) {
cb(null, `${file.originalname}`);
},
});
@@ZackymengPositif thanks boss it's work for me