How do I rename the public id on upload using Nodejs and upload_stream?

Comments

1 comment

  • Avatar
    Itay Taragano

    You can set the public ID to be whatever you want by using the  public_id  parameter while uploading

    function(buffer, filename, done) {
    var stream = cloudinary.uploader.upload_stream(function(result) { done(result) }, {public_id: "my_picture"});
    stream.write(data);
    stream.end();
    }

    0
    Comment actions Permalink

Please sign in to leave a comment.