Skip to main content

Renaming a raw asset using the image rename method?

Comments

2 comments

  • Itay Taragano

    In default, API calls are set to the  image  resource type. In order to perform API calls for  raw  resources, you should also set the  resource_type  to  raw  in the  rename  API call.

    For example in PHP:

    \Cloudinary\Uploader::rename('old_name', 'new_name', array("resource_type" => "raw"));

    Also note that the public ID can be set while uploading, by setting the  public_id  parameter to your required public ID instead of the randomly generated one.

    For example:

    \Cloudinary\Uploader::upload("file.sql" array("public_id" => "my_file.sql", "resource_type" => "raw"));

    For more information in PHP:

    http://cloudinary.com/documentation/php_image_upload#public_id

    0
  • Nim Wunnan

    This completely solves my issue! Thank you!

    0

Post is closed for comments.