aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/real-world/tools
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/real-world/tools')
-rw-r--r--server/tests/real-world/tools/upload.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/server/tests/real-world/tools/upload.js b/server/tests/real-world/tools/upload.js
index ba08028cf..49076ee2a 100644
--- a/server/tests/real-world/tools/upload.js
+++ b/server/tests/real-world/tools/upload.js
@@ -9,6 +9,7 @@ program
9 .option('-u, --url <url>', 'Server url') 9 .option('-u, --url <url>', 'Server url')
10 .option('-a, --access-token <token>', 'Access token') 10 .option('-a, --access-token <token>', 'Access token')
11 .option('-n, --name <name>', 'Video name') 11 .option('-n, --name <name>', 'Video name')
12 .option('-d, --category <category number>', 'Category number')
12 .option('-d, --description <description>', 'Video description') 13 .option('-d, --description <description>', 'Video description')
13 .option('-t, --tags <tags>', 'Video tags', list) 14 .option('-t, --tags <tags>', 'Video tags', list)
14 .option('-f, --file <file>', 'Video absolute file path') 15 .option('-f, --file <file>', 'Video absolute file path')
@@ -18,6 +19,7 @@ if (
18 !program.url || 19 !program.url ||
19 !program.accessToken || 20 !program.accessToken ||
20 !program.name || 21 !program.name ||
22 !program.category ||
21 !program.description || 23 !program.description ||
22 !program.tags || 24 !program.tags ||
23 !Array.isArray(program.tags) || 25 !Array.isArray(program.tags) ||
@@ -34,6 +36,7 @@ fs.access(program.file, fs.F_OK, function (err) {
34 program.url, 36 program.url,
35 program.accessToken, 37 program.accessToken,
36 program.name, 38 program.name,
39 program.category,
37 program.description, 40 program.description,
38 program.tags, 41 program.tags,
39 program.file 42 program.file
@@ -46,10 +49,10 @@ function list (val) {
46 return val.split(',') 49 return val.split(',')
47} 50}
48 51
49function upload (url, accessToken, name, description, tags, file) { 52function upload (url, accessToken, name, category, description, tags, file) {
50 console.log('Uploading %s video...', program.name) 53 console.log('Uploading %s video...', program.name)
51 54
52 utils.uploadVideo(url, accessToken, name, description, tags, file, function (err) { 55 utils.uploadVideo(url, accessToken, name, category, description, tags, file, function (err) {
53 if (err) throw err 56 if (err) throw err
54 57
55 console.log('Video uploaded.') 58 console.log('Video uploaded.')