bingher / obs
api for object storage
1.0.7
2024-08-16 06:41 UTC
Requires
- php: >=7.4
Requires (Dev)
- aliyuncs/oss-sdk-php: ^2.6
- aws/aws-sdk-php: ^3.261
- hassankhan/config: ^3.1
- obs/esdk-obs-php: ^3.22
- phpunit/phpunit: ^9.6
- qcloud/cos-sdk-v5: ^2.6
README
API for object storage server
Support platform
- huawei OBS
- minio
- seaweedFS
- amazon S3
- aliyun OSS
- tencent COS
Installation
- Install Base library [==requied==]
composer require bingher/obs
- HwOBS [==optional==]
composer require obs/esdk-obs-php
- S3 [==optional==]
composer require aws/aws-sdk-php
- MinIO [==optional==]
composer require aws/aws-sdk-php
- AliOSS [==optional==]
composer require aliyuncs/oss-sdk-php
- COS [==optional==]
composer require qcloud/cos-sdk-v5
Usage
$obs = new bingher\obs\OBS( [ 'type' => 'HwOBS', //[HwOBS,S3,MinIO,AliOSS,COS] 'endpoint' => 'https://endpoint', 'bucket' => 'bucket name', 'key' => 'access key', 'secret' => 'access secret', ] ); //put object $obs->put($key,$filePath); //get object $obs->get($key,$filePath); //object preview url $obs->url($key); //object put url $obs->putUrl($key); //delete object $obs->delete($key); //check object exist $obs->exist($key); //call any public method of sdk ex:doesObjectExist $obs->doesObjectExist($key);