Skip to main content

unsigned_cloudinary_upload, cloudinary_upload_url and use_filename: true

Comments

4 comments

  • Itay Taragano

    Hi Alex,

    Currently when uploading from a remote URL while enabling use_filename , Cloudinary indeed uses the whole URL as the public ID rather than the last component. While it's on our road-map to support this as well, in the meantime you can specify a custom public_id while uploading. Note that this can be also generated via on of our integration libraries. e.g., in .NET:

    var upload = cloudinary.Upload(new ImageUploadParams()

    {

    File = new FileDescription(@"http://www.example.com/my_image.jpg"),

    UploadPreset = "my_preset",

    PublicId = "my_image",

    Unsigned = true

    });

    0
  • Alex Resnik

    Hi Itay

    I have to do all things on the client side. This is my current code:

    $('.cloudinary_fileupload').fileupload('option', 'public_id', 'artest1410291643');

    $('.cloudinary_fileupload').cloudinary_upload_url(upload_url_form.url.value);

    delete ($('.cloudinary_fileupload').fileupload('option', 'public_id'));

    Unfortunately it does not work - the whole URL still is used, not 'artest1410291643' as I expected. What am I doing wrong?

    Thank you

    Alex

     

    0
  • Itay Taragano

    If you use unsigned uploads, you can use something like the following:

    $('.cloudinary_fileupload').unsigned_cloudinary_upload(<upload\_preset>, {public_id: "my_image"});

    0
  • Alex Resnik

    Great thanks. It is working ok.

    Please mark this topic as resolved.

    0

Post is closed for comments.