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 )
385
385
```
386
386
387
387
该方法是基于[ 又拍云云处理] ( http://docs.upyun.com/cloud/ ) 服务实现,可以实现音视频的转码、切片、剪辑;文件的压缩解压缩;文件拉取功能
388
- 所有需要调用该方法处理的资源,必须已经上传到云存储服务,未上传到云存储的文件,同时需要云处理功能,请使用 ` write ` 方法。
388
+
389
+ 注意:
390
+ - 所有需要调用该方法处理的资源,必须已经上传到云存储服务
391
+ - 使用 ` process ` 之前,必须配置 ` config->processNotifyUrl ` ,否则会提交任务失败
392
+
389
393
例如视频转码:
390
394
```
391
395
process($source, array(
Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ class Pretreat
17
17
18
18
public function __construct (Config $ config )
19
19
{
20
+ if (!$ config ->processNotifyUrl ) {
21
+ throw new \Exception ("should config prosessNotifyUrl first. " );
22
+ }
20
23
$ this ->config = $ config ;
21
24
}
22
25
@@ -29,7 +32,7 @@ public function process($source, $tasks)
29
32
]);
30
33
31
34
$ params = array (
32
- 'bucket_name ' => $ this ->config ->bucketName ,
35
+ 'service ' => $ this ->config ->bucketName ,
33
36
'notify_url ' => $ this ->config ->processNotifyUrl ,
34
37
'source ' => $ source ,
35
38
'tasks ' => $ encodedTasks ,
Original file line number Diff line number Diff line change @@ -297,7 +297,11 @@ public function purge($urls)
297
297
* 异步云处理
298
298
*
299
299
* 该方法是基于[又拍云云处理](http://docs.upyun.com/cloud/) 服务实现,可以实现音视频的转码、切片、剪辑;文件的压缩解压缩;文件拉取功能
300
- * 所有需要调用该方法处理的资源,必须已经上传到云存储服务,未上传到云存储的文件,同时需要云处理功能,请使用 `write` 方法。
300
+ *
301
+ * 注意:
302
+ * - 所有需要调用该方法处理的资源,必须已经上传到云存储服务
303
+ * - 使用 `process` 之前,必须配置 `config->processNotifyUrl`,否则会提交任务失败
304
+ *
301
305
* 例如视频转码:
302
306
* ```
303
307
* process($source, array(
@@ -309,7 +313,6 @@ public function purge($urls)
309
313
* ... // 同时还可以添加其他任务
310
314
* ))
311
315
* ```
312
- * 注意,被处理的资源需要已经上传到又拍云云存储
313
316
*
314
317
* @param string $source 需要预处理的图片、音视频资源在又拍云存储的路径
315
318
* @param array $tasks 需要处理的任务
You can’t perform that action at this time.
0 commit comments