Skip to main content

Can't upload without full file path. Can't get file path, only "C:\fakepath". Then, how?

Comments

1 comment

  • Stephen Doyle

    Hi Julio,

    "cloudinary.v2.uploader.upload" is a method from our server-side Node SDK, but it sounded from your question like you might be trying to use it from client-side Javascript code - if so, that's not possible and it will probably not work for you.

    To make upload requests from client-side javascript, you can use our JQuery SDK, or make HTTP requests to the API endpoint directly, and there's more information on this documentation, just below where our Upload Widget is mentioned: https://cloudinary.com/documentation/javascript_image_and_video_upload#upload_options

    If you are indeed making the requests from server-side Node code, the most likely explanation is that the data submitted by the frontend to your Node code hasn't been processed correctly before you try to send it to our SDK - in that case, please check any middleware you're using to turn the form Data into File objects (for example, Multer is commonly used for that, including in some of our examples: https://github.com/expressjs/multer )

    Regards,

    Stephen

    0

Post is closed for comments.