We can see that all the downloads from the official website are of version 7.0 or later, but the sdk documentation is of version 6.0. When can we get the sdk documentation of Version 7? Especially for private resources, almost no official website downloads are all versions 7.0 or above, but the sdk documentation is 6.0. When can I get the sdk documentation of 7? In particular, there is almost no download for private resources.
Reply content:
We can see that all the downloads from the official website are of version 7.0 or later, but the sdk documentation is of version 6.0. When can we get the sdk documentation of Version 7? In particular, there is almost no download for private resources.
For more information, see the documentation.
PHP V7SDK documentation
Use Qiniu \ Auth; $ accessKey = 'Access _ key'; $ secretKey = 'secret _ key'; // construct an authentication object $ auth = new Auth ($ accessKey, $ secretKey); // the space to be uploaded $ bucket = 'rainwy'; // The external link in the private space http ://
/
$ BaseUrl = 'HTTP: // 7xox85.com1.z0.glb.clouddn.com/resume.doc'#// sign the link $ signedUrl = $ auth-> privateDownloadUrl ($ baseUrl); echo $ signedUrl;
public function privateDownloadUrl($baseUrl, $expires = 3600) { $deadline = time() + $expires; $pos = strpos($baseUrl, '?'); if ($pos !== false) { $baseUrl .= '&e='; } else { $baseUrl .= '?e='; } $baseUrl .= $deadline; $token = $this->sign($baseUrl); return "$baseUrl&token=$token"; }