Convert chained transformations

Comments

3 comments

  • Avatar
    Nadav Ofir

    Hi Michael,

    Unfortunately there is no direct way of accomplishing this.
    A possible workaround:
    1. Separate the long url into 2 separate strings containing the public_id and the raw transformation respectively.
    2. Replace the quality param with a string search & replace (or just add a new quality (q_{value}) to the end of the url which will actually override any additional quality param already present in the url), and then sign it.

    0
    Comment actions Permalink
  • Avatar
    michael connors

    Thanks, I have split apart the URL but I am now looping through the parameters i the URL and creating an object in php to use cloudinary_url to sign the url for security. Is there an easy way to sign the url? I am trying something like this:

     

    $options = [
    'quality' => "jpegmini",
    'sign_url' => true,
    "secure"=>true,
    'transformation' => $transformations
    ];
    $cloudinary_url = cloudinary_url( $upload_url, $options );

     

     

    0
    Comment actions Permalink
  • Avatar
    Nadav Ofir

    URL signing is done based on the API_SECRET which shouldn't be placed on the client-side, therefore naturally our JS doesn't support this step. You can use the PHP DK to automatically generate signed-URLs or imitate the signature process as it's done here: https://github.com/cloudinary/cloudinary_php/blob/master/src/Cloudinary.php#L514

    Makes sense?

    0
    Comment actions Permalink

Please sign in to leave a comment.