Skip to content

Commit 9715373

Browse files
committed
demo
1 parent a624077 commit 9715373

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

demo/pfop1.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
require_once __DIR__ . '/../vendor/autoload.php';
3+
4+
use Qiniu\Auth;
5+
use Qiniu\Processing\PersistentFop;
6+
7+
$accessKey = '<your_ak>';
8+
$secretKey = '<your_sk>';
9+
$auth = new Auth($accessKey, $secretKey);
10+
11+
$bucket = 'rwxf';
12+
$key = '1.mp4';
13+
$pipeline = 'abc';
14+
$pfop = New PersistentFop($auth, $bucket, $pipeline);
15+
16+
$key1 = 'saved.mp4';
17+
$entry1 = \Qiniu\base64_urlSafeEncode("$bucket:$key1");
18+
$fops = "avthumb/mp4/ss/60/t/60|saveas/$entry";
19+
20+
21+
list($id, $err) = $pfop->execute($key, $fops);
22+
echo "\n====> pfop avthumb result: \n";
23+
if ($err != null) {
24+
var_dump($err);
25+
} else {
26+
echo "PersistentFop Id: $id\n";
27+
}

0 commit comments

Comments
 (0)