File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -385,7 +385,11 @@ Upyun::process( string $source, array $tasks )
385385```
386386
387387 该方法是基于[ 又拍云云处理] ( http://docs.upyun.com/cloud/ ) 服务实现,可以实现音视频的转码、切片、剪辑;文件的压缩解压缩;文件拉取功能
388- 所有需要调用该方法处理的资源,必须已经上传到云存储服务,未上传到云存储的文件,同时需要云处理功能,请使用 ` write ` 方法。
388+
389+ 注意:
390+ - 所有需要调用该方法处理的资源,必须已经上传到云存储服务
391+ - 使用 ` process ` 之前,必须配置 ` config->processNotifyUrl ` ,否则会提交任务失败
392+
389393例如视频转码:
390394```
391395 process($source, array(
Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ class Pretreat
1717
1818 public function __construct (Config $ config )
1919 {
20+ if (!$ config ->processNotifyUrl ) {
21+ throw new \Exception ("should config prosessNotifyUrl first. " );
22+ }
2023 $ this ->config = $ config ;
2124 }
2225
@@ -29,7 +32,7 @@ public function process($source, $tasks)
2932 ]);
3033
3134 $ params = array (
32- 'bucket_name ' => $ this ->config ->bucketName ,
35+ 'service ' => $ this ->config ->bucketName ,
3336 'notify_url ' => $ this ->config ->processNotifyUrl ,
3437 'source ' => $ source ,
3538 'tasks ' => $ encodedTasks ,
Original file line number Diff line number Diff line change @@ -297,7 +297,11 @@ public function purge($urls)
297297 * 异步云处理
298298 *
299299 * 该方法是基于[又拍云云处理](http://docs.upyun.com/cloud/) 服务实现,可以实现音视频的转码、切片、剪辑;文件的压缩解压缩;文件拉取功能
300- * 所有需要调用该方法处理的资源,必须已经上传到云存储服务,未上传到云存储的文件,同时需要云处理功能,请使用 `write` 方法。
300+ *
301+ * 注意:
302+ * - 所有需要调用该方法处理的资源,必须已经上传到云存储服务
303+ * - 使用 `process` 之前,必须配置 `config->processNotifyUrl`,否则会提交任务失败
304+ *
301305 * 例如视频转码:
302306 * ```
303307 * process($source, array(
@@ -309,7 +313,6 @@ public function purge($urls)
309313 * ... // 同时还可以添加其他任务
310314 * ))
311315 * ```
312- * 注意,被处理的资源需要已经上传到又拍云云存储
313316 *
314317 * @param string $source 需要预处理的图片、音视频资源在又拍云存储的路径
315318 * @param array $tasks 需要处理的任务
You can’t perform that action at this time.
0 commit comments