How to delete 'raw' resources?

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 destroy API call.
For example in PHP:

\Cloudinary\Uploader::destroy('my_file.txt', array("resource_type" => "raw"));
Have more questions? Submit a request


  • Avatar
    Rohit Kumar

    Suppose i want to delete this file

    then what should be the exact payload for this ?

    \Cloudinary\Uploader::destroy('setixbbu9i03qnrczmbf.txt', array("resource_type" => "raw"));

    am right?

  • Avatar
    Maor Gariv

    Hi Rohit,

    Thanks for reaching out.

    Yes:) This is correct.
    The default `resource_type` is `image` so when destroying `video` or `raw` files, you should set the appropriate `resource_type`.

Powered by Zendesk