Update access mode method not available in SDK

Ouverte
#358 10 commentaires 0 réactions 1 personne assignée Voir sur GitHub

@aleksandar-cloudinary y travaille déjà.

Depuis le 27/5/2022.

Évaluation

Cette issue n'a pas encore été évaluée.

Description

Bug report for Cloudinary PHP SDK

Before proceeding, please update to latest version and test if the issue persists

Describe the bug in a sentence or two.

In the documentation or the admin API, it references an API call to modify the access_mode on an asset as described here using the PHP SDK, but I am unable to find that API call (updateResourcesAccessMode) in the PHP SDK.

Issue Type (Can be multiple)

  • Build - Can’t install or import the SDK
  • Performance - Performance issues
  • Behaviour - Functions aren’t working as expected (such as generate URL)
  • Documentation - Inconsistency between the docs and behaviour
  • Other (Specify)

Steps to reproduce

  1. Install PHP SDK (I am using v2.7.1 on PHP 8.1.5).
  2. Try to make a call to updateResourcesAccessMode($access_mode, $options = []); as described in the above mentioned documentation.
  3. That method does not exist on the AdminApi object.

Error screenshots or Stack Trace (if applicable)

image
image

Fatal error: Uncaught Error: Call to undefined method Cloudinary\Api\Admin\AdminApi::updateResourcesAccessMode() in <redacted>\cloudinary-flysystem\src\CloudinaryAdapter.php:446
Stack trace:
#0 <redacted>\cloudinary-flysystem\test.php(62): Brandon14\CloudinaryFlysystem\CloudinaryAdapter->setVisibility('sample.jpg', 'private')
#1 {main}

Next League\Flysystem\UnableToSetVisibility: Unable to set visibility for file sample.jpg. Call to undefined method Cloudinary\Api\Admin\AdminApi::updateResourcesAccessMode() in <redacted>\cloud
inary-flysystem\vendor\league\flysystem\src\UnableToSetVisibility.php:33
Stack trace:
#0 <redacted>\cloudinary-flysystem\src\CloudinaryAdapter.php(454): League\Flysystem\UnableToSetVisibility::atLocation('sample.jpg', 'Call to undefin...', Object(Error))
#1 <redacted>\cloudinary-flysystem\test.php(62): Brandon14\CloudinaryFlysystem\CloudinaryAdapter->setVisibility('sample.jpg', 'private')
#2 {main}
  thrown in <redacted>\cloudinary-flysystem\vendor\league\flysystem\src\UnableToSetVisibility.php on line 33

Operating System

  • Linux
  • Windows
  • macOS
  • All

Environment and Frameworks (fill in the version numbers)

  • PHP Cloudinary SDK version - 2.7.1
  • PHP Version - 8.1.5
  • Framework (Laravel, Symphony, etc) - N/A

Repository

N/A

Langage dominant
PHP
Étoiles
402
Forks
151
Merge moyen
37 min
PR mergées (30 j)
2

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de cloudinary/cloudinary_php

Toutes les issues de cloudinary/cloudinary_php

Issues similaires

Plus d'issues PHP

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.