PHP Class Qiniu\Storage\UploadManager

ファイルを表示 Open project: qiniu/php-sdk Class Usage Examples

Public Methods

Method Description
__construct ( Config $config = null )
put ( $upToken, $key, $data, $params = null, $mime = 'application/octet-stream', $checkCrc = false ) : array 上传二进制流到七牛
putFile ( $upToken, $key, $filePath, $params = null, $mime = 'application/octet-stream', $checkCrc = false ) : array 上传文件到七牛
trimParams ( $params )

Method Details

__construct() public method

public __construct ( Config $config = null )
$config Qiniu\Config

put() public method

上传二进制流到七牛
public put ( $upToken, $key, $data, $params = null, $mime = 'application/octet-stream', $checkCrc = false ) : array
$upToken 上传凭证
$key 上传文件名
$data 上传二进制流
$params 自定义变量,规格参考 http://developer.qiniu.com/docs/v6/api/overview/up/response/vars.html#xvar
$mime 上传数据的mimeType
$checkCrc 是否校验crc32
return array 包含已上传文件的信息,类似: [ "hash" => "", "key" => "" ]

putFile() public method

上传文件到七牛
public putFile ( $upToken, $key, $filePath, $params = null, $mime = 'application/octet-stream', $checkCrc = false ) : array
$upToken 上传凭证
$key 上传文件名
$filePath 上传文件的路径
$params 自定义变量,规格参考 http://developer.qiniu.com/docs/v6/api/overview/up/response/vars.html#xvar
$mime 上传数据的mimeType
$checkCrc 是否校验crc32
return array 包含已上传文件的信息,类似: [ "hash" => "", "key" => "" ]

trimParams() public static method

public static trimParams ( $params )