Skip to main content

Renaming a raw asset using the image rename method?



  • 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:

  • Nim Wunnan

    This completely solves my issue! Thank you!


Post is closed for comments.