DEFAULT_OSS_HOST
DEFAULT_OSS_HOST = 'oss.aliyuncs.com'
OSS服务地址
OSS基础类
set_bucket_logging(string $bucket, string $target_bucket, string $target_prefix, array $options = NULL) : \ResponseCore
Set Bucket's Logging
string | $bucket | (Required) |
string | $target_bucket | (Required) |
string | $target_prefix | (Optional) |
array | $options | (Optional) |
set_bucket_website(string $bucket, string $index_document, string $error_document, array $options = NULL) : \ResponseCore
Set Bucket's Website
string | $bucket | (Required) |
string | $index_document | (Required) |
string | $error_document | (Optional) |
array | $options | (Optional) |
options_object(string $bucket, mixed $object, mixed $origin, mixed $request_method, mixed $request_headers, array $options = NULL) : \ResponseCore
Options Object
string | $bucket | (Required) |
mixed | $object | |
mixed | $origin | |
mixed | $request_method | |
mixed | $request_headers | |
array | $options | (Optional) |
list_object(string $bucket, array $options = NULL) : \ResponseCore
List Object
string | $bucket | (Required) |
array | $options | (Optional) 其中options中的参数如下 $options = array( 'max-keys' => max-keys用于限定此次返回object的最大数,如果不设定,默认为100,max-keys取值不能大于100。 'prefix' => 限定返回的object key必须以prefix作为前缀。注意使用prefix查询时,返回的key中仍会包含prefix。 'delimiter' => 是一个用于对Object名字进行分组的字符。所有名字包含指定的前缀且第一次出现delimiter字符之间的object作为一组元素 'marker' => 用户设定结果从marker之后按字母排序的第一个开始返回。 ) 其中 prefix,marker用来实现分页显示效果,参数的长度必须小于256字节。 |
upload_file_by_content(string $bucket, string $object, array $options = NULL) : \ResponseCore
通过在http body中添加内容来上传文件,适合比较小的文件 根据api约定,需要在http header中增加content-length字段
string | $bucket | (Required) |
string | $object | (Required) |
array | $options | (Optional) |
copy_object(mixed $from_bucket, string $from_object, mixed $to_bucket, string $to_object, string $options = NULL) : \ResponseCore
拷贝Object
mixed | $from_bucket | |
string | $from_object | (Required) |
mixed | $to_bucket | |
string | $to_object | (Required) |
string | $options | (Optional) |
initiate_multipart_upload(string $bucket, string $object, array $options = NULL) : \ResponseCore
初始化multi-part upload,并且返回uploadId
string | $bucket | (Required) Bucket名称 |
string | $object | (Required) Object名称 |
array | $options | (Optional) Key-Value数组,其中可以包括以下的key |
upload_part(string $bucket, string $object, string $upload_id, array $options = null) : \ResponseCore
上传part
string | $bucket | (Required) Bucket名称 |
string | $object | (Required) Object名称 |
string | $upload_id | (Required) uploadId |
array | $options | (Optional) Key-Value数组,其中可以包括以下的key |
list_parts(string $bucket, string $object, string $upload_id, array $options = null) : \ResponseCore
list part
string | $bucket | (Required) Bucket名称 |
string | $object | (Required) Object名称 |
string | $upload_id | (Required) uploadId |
array | $options | (Optional) Key-Value数组,其中可以包括以下的key |
abort_multipart_upload(string $bucket, string $object, string $upload_id, array $options = NULL) : \ResponseCore
中止上传mulit-part upload
string | $bucket | (Required) Bucket名称 |
string | $object | (Required) Object名称 |
string | $upload_id | (Required) uploadId |
array | $options | (Optional) Key-Value数组,其中可以包括以下的key |
complete_multipart_upload(string $bucket, string $object, string $upload_id, string $parts, array $options = NULL) : \ResponseCore
完成multi-part上传
string | $bucket | (Required) Bucket名称 |
string | $object | (Required) Object名称 |
string | $upload_id | (Required) uploadId |
string | $parts | xml格式文件 |
array | $options | (Optional) Key-Value数组,其中可以包括以下的key |
create_mtu_object_by_dir(string $bucket, string $dir, bool $recursive = false, string $exclude = ".|..|.svn", array $options = null) : \ResponseCore
通过Multi-Part方式上传整个目录,其中的object默认为文件名
string | $bucket | (Required) |
string | $dir | (Required) 必选 |
bool | $recursive | (Optional) 是否递归,如果为true,则递归读取所有目录,默认为不递归读取 |
string | $exclude | 需要过滤的文件 |
array | $options | (Optional) 关联数组 |
create_object_group(string $bucket, string $object_group, array $object_arry, array $options = NULL) : \ResponseCore
创建Object Group
string | $bucket | (Required) Bucket名称 |
string | $object_group | (Required) Object Group名称 |
array | $object_arry | (Required) object数组,所有的object必须在同一个bucket下 其中$object 数组的格式如下: $object = array( $object1, $object2, ... ) |
array | $options | (Optional) |