first commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace App\Http\Controller;
|
||||
|
||||
|
||||
use Swoft\Http\Server\Annotation\Mapping\Controller;
|
||||
use Qiniu\Auth;
|
||||
use Qiniu\Storage\UploadManager;
|
||||
use Swoft\Http\Server\Annotation\Mapping\RequestMapping;
|
||||
|
||||
/**
|
||||
* @Controller("admin")
|
||||
* @package App\Http\Controller
|
||||
*/
|
||||
class QiniuTokenController extends BaseController {
|
||||
|
||||
/**
|
||||
* @RequestMapping("token")
|
||||
*/
|
||||
public function getToken () {
|
||||
$accessKey = '0MGmT_rkMiaOeXY09B4EhBnXuDcIYyKlGumQ-zUt';
|
||||
$secretKey = '59dfmEi9Q50rMlz9sxTBCvYDhM7biERAjflBXALb';
|
||||
$auth = new Auth($accessKey, $secretKey);
|
||||
|
||||
return $this->response->success([
|
||||
"token" => $auth->uploadToken("guaikevideo")
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user