cloudinary-community / cloudinary-laravel

Laravel SDK for Cloudinary
MIT License
258 stars 70 forks source link

Call to undefined method Cloudinary\Api\Admin\AdminApi::deleteResourcesByPrefix() #38

Closed lucaspdude closed 2 years ago

lucaspdude commented 2 years ago

I'm using spatie/media-library to handle my model's media. Everything is working OK, with the only exception to when i try to delete a media item, i receive the following error:

Call to undefined method Cloudinary\Api\Admin\AdminApi::deleteResourcesByPrefix()

The rest of the stack traces shows this message:

CloudinaryLabs\CloudinaryLaravel\CloudinaryAdapter::deleteDir
vendor/cloudinary-labs/cloudinary-laravel/src/CloudinaryAdapter.php:189
 /**

     * Delete a directory.

     * Delete Files using directory as a prefix.

     *

     * @param string $dirname

     *

     * @return bool

     *

     * @throws ApiError

     */

    public function deleteDir($dirname)

    {

        $this->adminApi()->deleteResourcesByPrefix($dirname);

        return true;

    }
SlimGee commented 2 years ago

@lucaspdude that issue has been fixed already but I think noone made a release use the dev-master version that should solve your issue