cloudinary / cloudinary/cloudinary_php

Update access mode method not available in SDK

Đang mở
#358 10 bình luận 0 reaction 1 người được giao Được @aleksandar-cloudinary nhận Xem trên GitHub
Ngôn ngữ chính
PHP
Star
399
Fork
151
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## 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](https://cloudinary.com/documentation/admin_api#update_access_mode) 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
- [x] Behaviour - Functions aren’t working as expected (such as generate URL)
- [x] 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](https://user-images.githubusercontent.com/1152696/170582489-7e4b432e-a835-4623-8306-146cb67c3d3a.png)
![image](https://user-images.githubusercontent.com/1152696/170582709-bf3cf618-1b99-4971-8856-6057be6fe5c5.png)

```log
Fatal error: Uncaught Error: Call to undefined method Cloudinary\Api\Admin\AdminApi::updateResourcesAccessMode() in \cloudinary-flysystem\src\CloudinaryAdapter.php:446
Stack trace:
#0 \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 \cloud
inary-flysystem\vendor\league\flysystem\src\UnableToSetVisibility.php:33
Stack trace:
#0 \cloudinary-flysystem\src\CloudinaryAdapter.php(454): League\Flysystem\UnableToSetVisibility::atLocation('sample.jpg', 'Call to undefin...', Object(Error))
#1 \cloudinary-flysystem\test.php(62): Brandon14\CloudinaryFlysystem\CloudinaryAdapter->setVisibility('sample.jpg', 'private')
#2 {main}
thrown in \cloudinary-flysystem\vendor\league\flysystem\src\UnableToSetVisibility.php on line 33
```

## Operating System
- [ ] Linux
- [x] 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.