Uploading images to Cloudinary without specifying the image path in nodejs code

Comments

3 comments

  • Avatar
    Shirly Manor

    Hi,

    When using upload it will search the image in the same directory as the upload call.

    You can specify the full path (as you provide in your first example or call the upload from the same folder as the image.

    Hope that helps,

    0
    Comment actions Permalink
  • Avatar
    Gianluca

    Hi Shirly.

     

    I want to allow multiple users to use this as well, so they wouldn't be using my local machine. I was looking to be able to upload the image they select from their local machine and then upload it to Cloudinary. Is this possible?

    0
    Comment actions Permalink
  • Avatar
    Loic Verger Del Bove

    Hi Gianluca,

    To do so, you can:

    • Use our Upload Widget.
    • Create a form with an input_type_file on your side. When the form is submitted, you can pass the data via a POST to your backend and then call the code you already have to upload files to Cloudinary. There is a StackOverflow explaining all the steps before the upload to Cloudinary here.

    Hope that helps,

    Best,

    Loic

    0
    Comment actions Permalink

Please sign in to leave a comment.