Cloudinary Files/Images CRUD Operations Using Nodejs, Multer and MongoDB

Поделиться
HTML-код
  • Опубликовано: 10 дек 2024

Комментарии • 127

  • @colbr6733
    @colbr6733 Год назад +4

    Like how you break down the code into smaller sections at the start and then walkthrough what the code does. Makes it very straightforward to follow. Thanks Faran, really useful content.

  • @johnpaulifeanyi5871
    @johnpaulifeanyi5871 4 года назад +10

    Saved me one-month headache, thanks so much

  • @odysseusoma179
    @odysseusoma179 2 года назад +1

    After 3 weeks and several courses, your video helped fix my code in 30 mins even though its 2 years old. Thnak you very very much.

  • @MinhazulAbedinMunna
    @MinhazulAbedinMunna 2 года назад

    This is exactly that what i'm trying to do and searching last 15 to 20 day's.. Thanks a lot......

  • @CodeNCoffe
    @CodeNCoffe 10 дней назад

    Really nice video. I don't why it has low view count. This video is awesome. Thank YOu so much and keep doing the great work

  • @mydhe6
    @mydhe6 4 года назад +8

    This is a really good tutorial in less than 30 mins. I hope you get a better microphone for your recording sessions. Thank you very much Farooq.

    • @farhanfarooq
      @farhanfarooq  4 года назад +3

      oh, I just listened it again and yes the background noise is awkward. I dont know what happened as far as I remembered I reviewed it, it wasn't that bad but now it is. Sorry about that weird background noise.

  • @offgridvince
    @offgridvince Месяц назад +1

    Perfect! Thank you.

  • @ujjwal.sapkota
    @ujjwal.sapkota Год назад +1

    this video is very helpful.. Thanks a lot sir.. you really saved me today...

  • @ivansetiawan4318
    @ivansetiawan4318 3 года назад

    thanks a lot man, i've tried multer w/ cloudinary for 4 days to no avail, but your video solve it.

  • @nurudeenrabiu8325
    @nurudeenrabiu8325 2 года назад

    Liked and Subscribed !!! Thanks Farooq for such a detailed tutorial.

  • @mmathan9355
    @mmathan9355 7 месяцев назад

    one of the best video of file upload

  • @Koro-qr7qe
    @Koro-qr7qe Год назад +1

    Such a grate video! Thanks for your effort.

  • @cristiancamilopatiniocarva2463
    @cristiancamilopatiniocarva2463 4 года назад +1

    Thanks... at the beginning i had problems to consume the API, but was for postman (I dont'n knew why but I sent my request from "Insomnia" and it worked nice)

  • @vinitchuri9729
    @vinitchuri9729 2 года назад

    thanks a lot Farhan, I was stressed about this feature before the final year project presentation, as only this image uploading end point was giving me issues, seeing your video was lot helpful, it solved the issue.💯👍

  • @bhagabatiprasad2612
    @bhagabatiprasad2612 3 года назад +1

    Thank you bro. I can't express how much it helped me. I was looking for it. And got the perfect one.

  • @thecutedreamkostasp.4449
    @thecutedreamkostasp.4449 2 года назад +2

    For anyone wondering which name to provide on upload.single(name) , if trying to make an asynchronous request for an image upload with axios, fetch or w.e library, u should provide the same name which you declare on FormData object for the image field! For example on js:
    const uploadImage = ()=> {
    const imageFile = document.querySelector('input[type="file"]).files[0]
    const formData = new FormData()
    formData.push("image", imageFile) // u need to give the name "image" on upload.single("image") on multer!
    const response = await fetch("localhost:3000/upload", { method:"POST", body:formData} // u may need additional options here like headers cors etc)
    const data = await response .json()
    }
    Sorry for my bad english! I hope i helped!

  • @cozybeatz5096
    @cozybeatz5096 3 года назад

    Great tutorial Farhan!...saved me a lot of research, love to see more!

  • @elmirmahmudov6215
    @elmirmahmudov6215 4 года назад +1

    Thanks man! You are doing great job. Just keep it.

  • @faldinurikhsan5048
    @faldinurikhsan5048 3 года назад

    you saving my life bro, really appreciate it man

  • @tusharkrs3524
    @tusharkrs3524 2 года назад

    Superb! you explained very well.

  • @hoquang1386
    @hoquang1386 3 года назад

    it's very helpful, thank you very much Farhan

  • @ogt1407gabriel
    @ogt1407gabriel 2 года назад +1

    great video man but im getting this error Cannot read properties of undefined (reading 'uploader')
    and i copied everthing from your github and tried everthing and nothing will make it work

  • @delfinoakbar6052
    @delfinoakbar6052 2 года назад +1

    this is great tutorial but i have a problem with req.file.path in ./routes/user.js there is error " Cannot read properties of undefined (reading 'path')" while trying to testing upload with postman and i already compared my backend with yours but i still got an error with path. so what should i do ??

  • @c.r.u.d6962
    @c.r.u.d6962 2 года назад +1

    Hi. I need a tutorial for cloudinary +Nodejs update multiple images❓❓❓❓❓❓

  • @abhi-ek7ey
    @abhi-ek7ey 2 года назад

    thank you bro really helpful to me in very short time period thanks a lot

  • @vivianafb
    @vivianafb 3 года назад

    Great tutorial, you saved my life xD

  • @veenaprakash3498
    @veenaprakash3498 2 года назад

    When creating the cloudinary account which product did you select? Options are:
    - Programmable Media for Image and video API
    - Digital Asset Management for creation and collaboration
    - Media Optimizer for performance and delivery

  • @amineouadi3282
    @amineouadi3282 4 года назад +1

    You were very helpful Sir , Thank you very much

  • @bocahlagi9104
    @bocahlagi9104 3 года назад

    love from indonesia 🇮🇩

  • @eggxecution
    @eggxecution Год назад +1

    this is the code used in my website

  • @jabbarhafizh_288
    @jabbarhafizh_288 3 года назад

    thank you so much, Farhan. nice

  • @Ravi-yk3oy
    @Ravi-yk3oy 4 года назад +1

    Your video help me alot I was trying to upload image using mongodb buffer and use it in frontend but I failed.

    • @farhanfarooq
      @farhanfarooq  4 года назад +1

      Glad it worked for you

    • @Ravi-yk3oy
      @Ravi-yk3oy 4 года назад

      @@farhanfarooq bro can we upload image in mongodb and directly convert into base64 in front end

    • @charlesbolton2981
      @charlesbolton2981 3 года назад

      @@Ravi-yk3oy yes

  • @hopesnevergone5173
    @hopesnevergone5173 2 года назад

    Thanks a lot! it was very helpful!

  • @pp.uta7
    @pp.uta7 3 года назад

    nice tutorial bro, so helpful

  • @olgabaeva727
    @olgabaeva727 Год назад

    thank you for this video 😊

  • @aaronrebelo9297
    @aaronrebelo9297 2 года назад +1

    I keep getting the error Cannot read properties of undefined (reading 'upload').. and yes i compared the code

    • @tonyata7006
      @tonyata7006 2 года назад

      same to me ,
      did you find the solution ?

    • @tonyata7006
      @tonyata7006 2 года назад

      I found what was an issue , properly you are using import instead of require
      if course no problem , but it you notice in his code, he used after require("cloudinary").V2
      and if you don't use v2, you will got this error
      so the code will become :
      .
      const result = await Cloudinary.v2.uploader.upload(req.file.path)
      .
      and you need to set the right configuration before this request:
      .
      Cloudinary.v2.config({
      cloud_name: process.env.CLOUD_NAME,
      api_key: process.env.CLOUD_API_KEY,
      api_secret: process.env.CLOUD_API_SECRET
      })
      .
      and that's will solve it 100%

  • @eliasayele1102
    @eliasayele1102 4 года назад +1

    Thanks Bro you help me a lot 🙏🙏🙏🙏🙏🙏🙏

  • @lilbob3201
    @lilbob3201 2 года назад

    Great Tutorial !

  • @saulofelipe265
    @saulofelipe265 2 года назад

    thanks for the tutorial. 🇧🇷

  • @Jun-zq3bn
    @Jun-zq3bn 2 года назад

    how can i do this but upload videos instead of images?

  • @raba650
    @raba650 3 года назад

    Your get request only gets the user, it didn’t fetch the user’s images. Does cloudinary support getting images like this with a custom REST api?

  • @THEVIKASDIARIESVLOG
    @THEVIKASDIARIESVLOG 2 года назад

    Hello sir i am store multi image in cloudnary how can store

  • @igorrak9873
    @igorrak9873 3 года назад

    Great work! You are unbelievable!

  • @thongoan4603
    @thongoan4603 4 года назад +1

    Help me :
    Cannot read property 'path' of undefined

    • @farhanfarooq
      @farhanfarooq  4 года назад +1

      Link to source code is in description please compare it with your code

    • @djphero1186
      @djphero1186 4 года назад

      I am getting the same error

    • @parassharma7041
      @parassharma7041 2 года назад

      @@djphero1186 did you solve it

    • @djphero1186
      @djphero1186 2 года назад

      @@parassharma7041 No it didn't work..I used digital ocean instead

  • @pragatirawat1103
    @pragatirawat1103 2 года назад

    Thank you for this

  • @forinda
    @forinda 2 года назад

    Great work. The content was benefitial and wish for more of the same

  • @apurvkolte2705
    @apurvkolte2705 2 года назад

    How to upload multiple images

  • @mohinigarg7762
    @mohinigarg7762 3 года назад

    Anyone plzz help me when i send the post request from postman and upload a file its shows error 404 😭

  • @YorchCb
    @YorchCb 2 года назад

    Thank you very much! new subscriber!

  • @fullStackInKannada
    @fullStackInKannada 3 года назад

    Thank you so much! It helped me alot.

  • @kumarkumar-j2w2l
    @kumarkumar-j2w2l Год назад

    thanks alot, other than no words

  • @bolu7358
    @bolu7358 2 года назад

    What Is a middleware?

  • @sanjheev
    @sanjheev 3 года назад

    bro this showing typeerror: cannot read property 'path' of undefined multer if i use it from my own frontend

    • @farhanfarooq
      @farhanfarooq  3 года назад

      link to source code is in the description, compare your code

    • @parassharma7041
      @parassharma7041 2 года назад

      Hey did you find the solution

  • @infoentertainia
    @infoentertainia 3 года назад

    upload.single() is not a function. I'm facing with this problem.

    • @farhanfarooq
      @farhanfarooq  3 года назад

      link to source code is in the description, compare your code

  • @mohammadrafey2981
    @mohammadrafey2981 3 года назад

    A question regarding the secure_url property. Do we need to store that also in the database so when working on the front end we can use that to display the image?

    • @farhanfarooq
      @farhanfarooq  3 года назад +1

      that's correct

    • @ujenbasi9495
      @ujenbasi9495 3 года назад

      @@farhanfarooq hey how to delete multiple images?

  • @NotBeHaris
    @NotBeHaris 3 года назад

    Is there any size limit for uploading image and also limit for image type.

  • @suchidoodles
    @suchidoodles Год назад

    Can upload video In that way?

  • @piruthuviraj
    @piruthuviraj 3 года назад

    Thank you so much..You helped me😍😍

  • @wahidchandra7346
    @wahidchandra7346 2 года назад

    Hi, I followed your code, but I got this error message
    TypeError: Cannot read properties of undefined (reading 'path')
    Can I replace req.file.path with req.body.image ?
    Because, when I log req.file or req.file.path, it returned undefined.
    I already compare my backend code with your backend code.
    However, in the frontend side, I didn't follow your code because I use react hook form and next js.
    What should I do to tackle this error?
    Thank you...

    • @farhanfarooq
      @farhanfarooq  2 года назад

      try to send request using postman and do follow the video such as field names, if it work then problem is with your frontend

    • @wahidchandra7346
      @wahidchandra7346 2 года назад

      @@farhanfarooq I think so, I just tried with postman and req.file.path works... Do you have any reference how to upload image/file with react hook form?

  • @vohoangan6121
    @vohoangan6121 2 года назад

    thank you so much bro

  • @Saje3l
    @Saje3l 3 года назад

    Thanks for the video,
    A quick question
    can we upload pdf files to cloudinary?

  • @mkr6642
    @mkr6642 3 года назад +1

    You're the best

  • @rog0079
    @rog0079 3 года назад +1

    Great video! what if we need to upload multiple images? can you make a video for that part? Thanks!

    • @nurudeenrabiu8325
      @nurudeenrabiu8325 2 года назад

      Also need this too

    • @tonyvito5062
      @tonyvito5062 Год назад

      just change upload.single() with upload.array('images', 4) for example 4 images

  • @fernandosegre9116
    @fernandosegre9116 3 года назад

    you're great!! gave you a susbcribe, looking forward to watch more of your videos!

  • @ummarfarooqpk
    @ummarfarooqpk 2 года назад

    Thanks brother

  • @milagrosvegacolque440
    @milagrosvegacolque440 4 года назад

    i have a problem --can you helpme please?---------->> TypeError : Cannot read property 'path' of undefined

    • @farhanfarooq
      @farhanfarooq  4 года назад

      Please compare your code with the source code, link is in description

  • @bolu7358
    @bolu7358 2 года назад

    Great tutorial, but I lack the basic understanding

  • @felixmilome
    @felixmilome 3 года назад

    I wish you had one where you merge with frontend

    • @farhanfarooq
      @farhanfarooq  3 года назад +2

      Its already available on this channel, here you go ruclips.net/video/JeJ2QnVYyoA/видео.html

    • @felixmilome
      @felixmilome 3 года назад

      @@farhanfarooq thanks

  • @shahreazneeloy2119
    @shahreazneeloy2119 3 года назад

    very nice video...I must say

  • @souvikdeb3249
    @souvikdeb3249 3 года назад

    Hi
    How do I use this to upload videos as well?

    • @farhanfarooq
      @farhanfarooq  3 года назад

      just change allowed file types in utils/multer.js the rest should work for videos as well

  • @GuiGHRP
    @GuiGHRP 2 года назад

    amazing!

  • @bhojakrahul5880
    @bhojakrahul5880 3 года назад

    Nice but is there, front end code also??

    • @farhanfarooq
      @farhanfarooq  3 года назад

      no just backend, I am not sure but may be in future I will create a video to integrate this with frontend

    • @farhanfarooq
      @farhanfarooq  3 года назад +1

      here is the frontend: ruclips.net/video/JeJ2QnVYyoA/видео.html

  • @wilsonchinedu813
    @wilsonchinedu813 4 года назад

    Am having issues uploading multiple images. Can you help?

    • @farhanfarooq
      @farhanfarooq  4 года назад

      Whats the problem?

    • @wilsonchinedu813
      @wilsonchinedu813 4 года назад

      @@farhanfarooq from your tutorial, you uploaded a single image using upload.single(). It worked for me, but am trying upload.array() for multiple files and it's not working.

    • @farhanfarooq
      @farhanfarooq  4 года назад

      check the multer's doc. You will find example of uploading multiple images

    • @wilsonchinedu813
      @wilsonchinedu813 4 года назад

      @@farhanfarooq wow thanks

    • @louisramsey854
      @louisramsey854 3 года назад

      @@wilsonchinedu813 were you able to do this, if yes, mind sharing how?
      been trying to do it but i keep getting an error
      thanks

  • @jorgealbertomorales2010
    @jorgealbertomorales2010 2 года назад

    TY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! i love so much 🤣

  • @thesolidblades
    @thesolidblades 3 года назад

    Perfect it is working

  • @talibhusain3335
    @talibhusain3335 7 месяцев назад

    Amazing

  • @ezone2726
    @ezone2726 4 года назад

    Should we pay to use mongodb?
    In free there will only give 500 mb and if our data will cross 500mb then at that time we should pay or not?
    Please reply😊
    Thank you😍

    • @farhanfarooq
      @farhanfarooq  4 года назад

      500mb is alot of space if you are not storing binary data / images within mongodb, anyway its upto you if you want to continue with mongo then upgrade your plan

    • @ezone2726
      @ezone2726 4 года назад

      @@farhanfarooq in our real project, it will be good to use mongoDB as a free package.
      Instead of paying, does have any method to use unlimited storage mongoDB?

    • @farhanfarooq
      @farhanfarooq  4 года назад

      :D I dont know

  • @lenhu7089
    @lenhu7089 4 года назад +1

    Thank you

  • @kraiponnajaroon2206
    @kraiponnajaroon2206 3 года назад

    Thank you so much.

  • @muhammadhusnain8201
    @muhammadhusnain8201 3 года назад

    good bro

  • @malikadnan7
    @malikadnan7 2 года назад

    Finally.

  • @caloriecoin_ceo7847
    @caloriecoin_ceo7847 2 года назад

    Amazing tutorial!

  • @epatrickification
    @epatrickification 3 года назад +1

    Thank you