It's strange that the official document clearly states that this SDK includes the following functions: Data upload and download. Manage data: Copy, move, delete, obtain metadata, and retrieve files from columns. Data Processing: image processing, audio/video processing, and document processing. Why is this irresponsible? It's strange that the official document is clearly written.
This SDK includes the following functions:
Upload and download data.
Manage data: Copy, move, delete, obtain metadata, and retrieve files from columns.
Data Processing: image processing, audio/video processing, and document processing.
Why is this irresponsible?
Reply content:
It's strange that the official document is clearly written.
This SDK includes the following functions:
Upload and download data.
Manage data: Copy, move, delete, obtain metadata, and retrieve files from columns.
Data Processing: image processing, audio/video processing, and document processing.
Why is this irresponsible?
Qiniu has these functions. You can look at their source code:
Https://github.com/qiniu/php-sdk/tree/v7.0.4
All of the functional codes you mentioned are available.
use Qiniu\Storage\BucketManager;$bucketMgr = New BucketManager($this->auth);$bucketMgr->move(...);$bucketMgr->delete(...);
Find it.
View: https://github.com/qiniu/php-sdk/blob/v7.0.4/src/Qiniu/Storage/BucketManager.php
There are corresponding methods
/*** Delete a specified resource ** @ param $ bucket the space where the resource to be deleted is located * @ param $ key the file name of the resource to be deleted ** @ return mixed success return NULL, error returned object Qiniu \ Http \ Error * @ link http://developer.qiniu.com/docs/v6/api/reference/rs/delete.html */Public function delete ($ bucket, $ key) {$ path = '/delete /'. \ Qiniu \ entry ($ bucket, $ key); list (, $ error) = $ this-> rsPost ($ path); return $ error ;} /*** rename the resource, which is essentially a move operation. ** @ Param $ bucket space of the resource to be operated * @ param $ oldname name of the resource to be operated * @ param $ newname target resource file name ** @ return mixed success return NULL, failed return object Qiniu \ Http \ Error */public function rename ($ bucket, $ oldname, $ newname) {return $ this-> move ($ bucket, $ oldname, $ bucket, $ newname);}/*** rename the resource, which is essentially a move operation. ** @ Param $ from_bucket space where the resource to be operated is located * @ param $ from_key name of the resource to be operated * @ param $ to_bucket target resource space name * @ param $ to_key Target Resource Name **@ return mixed success return NULL, error returned object Qiniu \ Http \ Error * @ link http://developer.qiniu.com/docs/v6/api/reference/rs/copy.html */Public function copy ($ from_bucket, $ from_key, $ to_bucket, $ to_key) {$ from = \ Qiniu \ entry ($ from_bucket, $ from_key ); $ to = \ Qiniu \ entry ($ to_bucket, $ to_key); $ path = '/copy /'. $ from. '/'. $ to; list (, $ error) = $ this-> rsPost ($ path); return $ error ;} /*** transfer a resource from one space to another ** @ param $ from_bucket the space where the resource to be operated is located * @ param $ from_key the file name of the resource to be operated * @ param $ to_bucket the target resource space name * @ param $ to_key target resource file name ** @ return mixed success return NULL, error returned object Qiniu \ Http \ Error * @ link http://developer.qiniu.com/docs/v6/api/reference/rs/move.html */Public function move ($ from_bucket, $ from_key, $ to_bucket, $ to_key) {$ from = \ Qiniu \ entry ($ from_bucket, $ from_key ); $ to = \ Qiniu \ entry ($ to_bucket, $ to_key); $ path = '/move /'. $ from. '/'. $ to; list (, $ error) = $ this-> rsPost ($ path); return $ error ;}