|
@@ -19,19 +19,15 @@ class CallbackController
|
|
'callbackBody' => '{"hash":"$(etag)","key":"$(key)", "fname":"$(fname)", "fprefix":"$(fprefix)" ,"duration":"$(avinfo.video.duration)"}',
|
|
'callbackBody' => '{"hash":"$(etag)","key":"$(key)", "fname":"$(fname)", "fprefix":"$(fprefix)" ,"duration":"$(avinfo.video.duration)"}',
|
|
'callbackBodyType' => 'application/json',
|
|
'callbackBodyType' => 'application/json',
|
|
'forceSaveKey' => true,
|
|
'forceSaveKey' => true,
|
|
- 'saveKey' => 'duanju/$(etag)$(ext)',
|
|
|
|
|
|
+ 'saveKey' => 'duanju/$(x:video_id)/$(etag)$(ext)',
|
|
];
|
|
];
|
|
$upToken = $auth->uploadToken($qiniuConfig['bucket'], null, $expires, $policy, true);
|
|
$upToken = $auth->uploadToken($qiniuConfig['bucket'], null, $expires, $policy, true);
|
|
return $upToken;
|
|
return $upToken;
|
|
}
|
|
}
|
|
|
|
|
|
- public function downloadUrl(Request $request) {
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
public function callback(Request $request) {
|
|
public function callback(Request $request) {
|
|
$allInfo = $request->only(['duration', 'fname', 'hash', 'key', 'fprefix']);
|
|
$allInfo = $request->only(['duration', 'fname', 'hash', 'key', 'fprefix']);
|
|
- $videoUrl = config('common.qiniu.linkDomain') . DIRECTORY_SEPARATOR . $allInfo['key'];
|
|
|
|
|
|
+ $videoUrl = config('common.qiniu.publicVideoLinkDomain') . DIRECTORY_SEPARATOR . $allInfo['key'];
|
|
$publicVideoUrl = QiniuTokenService::getPrivateSourceDownloadUrl($videoUrl);
|
|
$publicVideoUrl = QiniuTokenService::getPrivateSourceDownloadUrl($videoUrl);
|
|
$allInfo['public_video_url'] = $publicVideoUrl;
|
|
$allInfo['public_video_url'] = $publicVideoUrl;
|
|
$allInfo['url'] = $videoUrl;
|
|
$allInfo['url'] = $videoUrl;
|