This support forum is no longer in use. Please use the Cloudinary Community at https://community.cloudinary.com/ to receive assistance from other members of the community and from Cloudinary's support team. For account-specific questions or if you believe that you've encountered a bug, please contact the Cloudinary team directly via the "submit a request" option on this support site.

Renaming a raw asset using the image rename method?

Comments

2 comments

  • Avatar
    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
    Comment actions Permalink
  • Avatar
    Nim Wunnan

    This completely solves my issue! Thank you!

    0
    Comment actions Permalink

Post is closed for comments.