itboye / component_oss
oss
Installs: 333
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=7.4
- ext-curl: *
- ext-json: *
- ext-simplexml: *
- dbh/core: 1.3.*
- qiniu/php-sdk: 7.2.*
README
第三方对象存储服务接口统一
-
七牛云
-
阿里云OSS
$cfg = new AliyunOssConfig();
...设置 key 密钥,endpoint,bucket名称
$uploader = new AliyunOss(new DemoConfig());
//如果指定了,$result 返回是同步请求该地址的结果
$callbackUrl = "";
$params = [];// 携带参数
$localpath = dirname(__DIR__)."/qiniu/demo.png";
$saveName = "/path/1.jpg";
$result = $uploader->putFile($saveName, $localpath, $cb, $params);
var_dump($result);
1.0.3
- 使用dbh/core 依赖
- 完善阿里云上传