public function setUp() { parent::setUp(); /** * 上传本地变量到bucket */ $object = "a.file"; $content = file_get_contents(__FILE__); $options = array(OssClient::OSS_LENGTH => strlen($content), OssClient::OSS_HEADERS => array('Expires' => 'Fri, 28 Feb 2020 05:38:42 GMT', 'Cache-Control' => 'no-cache', 'Content-Disposition' => 'attachment;filename=oss_download.log', 'Content-Encoding' => 'utf-8', 'Content-Language' => 'zh-CN', 'x-oss-server-side-encryption' => 'AES256', 'x-oss-meta-self-define-title' => 'user define meta info')); try { $this->ossClient->putObject($this->bucket, $object, $content, $options); } catch (OssException $e) { $this->assertFalse(true); } }
public function setUp() { parent::setUp(); $this->ossClient->putObject($this->bucket, 'oss-php-sdk-test/upload-test-object-name.txt', file_get_contents(__FILE__)); }
public function setUp() { parent::setUp(); }