BEST TUTORIAL EVER!! YOU HAVE SAVED ME!! i was stuck for 2 weeks and man! your tutorial help me to add the most important feature on my app!!! many many many thanks!!!!
Wow, what an excellent tutorial! 🙌 Your explanation was clear and easy to follow. I had been struggling with this for a while, but your solution worked like a charm for me. Thank you for sharing your knowledge and making it so accessible.
I do have a question 🙂, wouldn't this base 64 string increase the size of the database? If I want to use it in production, than it will take most space in MongoDb Atlas, for every user 🙂, for free tier 🙂, any suggestions, tips? 🙂
This tutorial is for understanding how to store image in base64 format in mongodb. If you have a production ready app then use S3/CloudFront store to upload images.
will the image persist ? I mean when the user logins next time whether he/she will be able to see his profile pic (maybe in the above code we have to add this )
Large file size causes error in MongoDB. That's why. But multer is difficult to understand. You store just image's filename in MongoDB but actual image is stored somewhere else. Most tutorial says you store it inside project folder . But after the project deployed into the internet, you don't know where it is actually stored.
I just wanna ask you for our final year project our final year project this image matching lost and found system is this approach is a storage officiant because we have a lot of image as you talk about profile image but in our project we have several images so is this storage efficient and a speed time efficient for storing data number of photos in the database using the base64 method, i want real image in backend where image is processed by machine learning model in backend
I'm getting the error "request entity too large" when trying to push to MongoDB. I have the Mongoose model type set to String ..... anyone have any ideas on how to get MongoDB to accept a large document?
@@talhakhan4423 using Multer was quite confusing for me when I want to integrate it to MongoDb database, help paste the link to the tutorial you used that helped.
Sir is it a correct way to start this project by fetching it's starting part from your Github repo ? Beacuse I am getting error while running the npm start command. Please help me out !
@@DailyTuition but the backend need more storage capacity right? Because next js doesn't support the production the public folder file serving is not available. So I asked this question.
@@eliyahutarab4862 , you saved my life today; but , how much impact it have on storage!? As per mongodb document size limits (16mb), Can you create a tutorial on using cloud functions to remove the image from mongodb to AWS or cloudnary, and store the image url back in mongodb!? 😌. Your way of explaining is really good
@@raymondmichael4987 You can store a good amount of it because its like a normal string so think about you are creating an app that has comments option so you can store a lot of comments so it taks some space but sould not be a problem even if it a big comment so there is no problem
BEST TUTORIAL EVER!! YOU HAVE SAVED ME!!
i was stuck for 2 weeks and man! your tutorial help me to add the most important feature on my app!!! many many many thanks!!!!
The timing couldn’t be better, thanks buddy
Most Welcome
I don't generally comment on any videos. But yes, I am doing it because this video has helped me truly today. I can't thank much 🙏🙂
Wow, what an excellent tutorial! 🙌 Your explanation was clear and easy to follow. I had been struggling with this for a while, but your solution worked like a charm for me. Thank you for sharing your knowledge and making it so accessible.
thank you so much bro. This base64 stuff is way easier than multer!
Made my day!
So so so true 🥹🥹
Thanks for the clear explanation of what you're doing; great video!
I was almost giving up to add profile functionality to my project. Thank you
This is just wonderful. Thanks for the clear explanations. You are an asset to the Dev space👌
keep it bro you gave me what exactly i was searching for? love from india.
Excellent explanation.. very easy to understand..
Glad you liked it
I really like how to adrress this tutorial, good job man !
Thank you for this video! you saved me! I was stuck with this for 2 days!
i have a doubt
after converting image in to binary how we call in react
greet job always waiting to see your tutorial keep going thank you so much
You are amazing the timeing of this video could not be in a bettter time
Thanks a lot bro this helped me immensely.
Please mention the model of your Microphone. It's very clear. I need to buy a microphone.
By the way, your this tutorial is very helpful for me.
Super Explanation. Keep it up.
Thank you.
Thank you, it's very helpful!
Fantastic! Thanks, helped me a lot.
thanks a lot very helpful and easiest way to do
Thanks you for this clear explanation sir🙏
Thanks a lot :))
Best 👌
perfectly explained
Thank you very much !!!
buen video bro 🔥❤
I do have a question 🙂, wouldn't this base 64 string increase the size of the database? If I want to use it in production, than it will take most space in MongoDb Atlas, for every user 🙂, for free tier 🙂, any suggestions, tips? 🙂
This tutorial is for understanding how to store image in base64 format in mongodb. If you have a production ready app then use S3/CloudFront store to upload images.
will the image persist ? I mean when the user logins next time whether he/she will be able to see his profile pic (maybe in the above code we have to add this )
yes. user can see his previous store images.
This is exactly what I need when i want to store in MongoDB. Not sure why most of the tutorial “mandates” multer.
Large file size causes error in MongoDB. That's why.
But multer is difficult to understand. You store just image's filename in MongoDB but actual image is stored somewhere else.
Most tutorial says you store it inside project folder . But after the project deployed into the internet, you don't know where it is actually stored.
I just wanna ask you for our final year project our final year project this image matching lost and found system is this approach is a storage officiant because we have a lot of image as you talk about profile image but in our project we have several images so is this storage efficient and a speed time efficient for storing data number of photos in the database using the base64 method, i want real image in backend where image is processed by machine learning model in backend
I'm getting the error "request entity too large" when trying to push to MongoDB. I have the Mongoose model type set to String ..... anyone have any ideas on how to get MongoDB to accept a large document?
Same error plz anyone tell us how to solve large img error..
metoo, i also got this error
Don't try this it will exceed your db limit check after uploading check with uploading 10photos
app.use(express.json({limit: '25mb'}));
app.use(express.urlencoded({limit: '25mb'}));
@@aurr690 sure?
Great tutorial. Am I the only one who's having problems with images larger than 100KB?
it is giving me error while saving to database
PayloadTooLargeError: request entity too large
Same here, been looking a solution for it.
Let me know if you've gotten any.
@@KingsleyOkeze i have changed the method because it was not working and now i am using multer, it is working properly
@@talhakhan4423 using Multer was quite confusing for me when I want to integrate it to MongoDb database, help paste the link to the tutorial you used that helped.
app.use(express.json({limit: '25mb'}));
app.use(express.urlencoded({limit: '25mb'}));
PayloadTooLargeError: request entity too large
at readStream
Hello Sir can u tell me ,which theme you are using..? in VS code
Sir is it a correct way to start this project by fetching it's starting part from your Github repo ? Beacuse I am getting error while running the npm start command. Please help me out !
It would be really helpful if you added subtitles to your videos
Sir how to run the server. its not start the server.plz help me sir
what is the error please tell me?
Nice
Great Sir!Which font style and theme are you using in vs code? Kindly Reply.
its lavla lasun
Storing image in mongo db is it good idea? Or we can store in public folder?
use backend storage instead of public folder
@@DailyTuition but the backend need more storage capacity right? Because next js doesn't support the production the public folder file serving is not available. So I asked this question.
I m making a quiz application using mern and want to add some questions and options as images. So can anyone suggest me how can I do that?
Can i upload pdf file to mongodb?
If(yes){
Return process;
}else{
Return Null;
}
What if i have a name and phone number to store with it
How can i inclube these things in react
const mongoose=require("mongoose")
const userschema=new mongoose.Schema({
username:{
type:String,
required:true,
min:5,
max:20,
unique:true
},
email:{
type:String,
required:true,
unique:true,
max:40,
},password:{
type:String,
required:true,
unique:true,
max:20,
},photo:{
type:String,
}
})
module.exports=mongoose.model("users",userschema)
6:41 image get api
Hey can u please tell me the FONT NAME bro. It would be so helpful.
that's not how we use in production level. generate an url and show image based on that url
Yes that's true. or we can use S3/CloudFront store to store images. This tutorial is just for education how we can store base64 in mongodb.
How to convert it back!?
You dont need to , after you have the image in the base 64 you simply can put it in the src of the image like its a normal link
@@eliyahutarab4862 , you saved my life today; but ,
how much impact it have on storage!? As per mongodb document size limits (16mb),
Can you create a tutorial on using cloud functions to remove the image from mongodb to AWS or cloudnary, and store the image url back in mongodb!? 😌.
Your way of explaining is really good
@@raymondmichael4987 You can store a good amount of it because its like a normal string so think about you are creating an app that has comments option so you can store a lot of comments so it taks some space but sould not be a problem even if it a big comment so there is no problem
@@eliyahutarab4862 thanks for your quick responses brother.
Pkease consider my request too
Throws cros error
Easier than multer
It does not help to upload more than 100kb
That's true. You can use atlas cloud storage.