时间:2021-07-01 10:21:17 帮助过:65人阅读
uploadToken($bucket);
$policy = array(
'returnUrl' => 'http://127.0.0.1/demo/simpleuploader/fileinfo.php',
'returnBody' => '{"fname": $(fname)}',
);
$upToken = $auth->uploadToken($bucket, null, 3600, $policy);
echo $upToken;
uploadToken($bucket);
$policy = array(
'returnUrl' => 'http://127.0.0.1/demo/simpleuploader/fileinfo.php',
'returnBody' => '{"fname": $(fname)}',
);
$upToken = $auth->uploadToken($bucket, null, 3600, $policy);
echo $upToken;
uploadToken($bucket, null, 3600, $policy);
顺序依次是 空间,文件名,有效时长deadline,上传策略;
参考文档
http://developer.qiniu.com/docs/v6/api/reference/security/upload-token.html
http://developer.qiniu.com/docs/v6/api/reference/security/put-policy.html