import { doRequestAndSaveToFile } from '../helpers/requests'
import { CONSTRAINTS_FIELDS } from '../initializers'
import { getClient, getVideoCategories, login, searchVideo, uploadVideo } from '../tests/utils'
+import { truncate } from 'lodash'
program
.option('-u, --url <url>', 'Server url')
}
const videoAttributes = {
- name: videoInfo.title,
+ name: truncate(videoInfo.title, {
+ 'length': CONSTRAINTS_FIELDS.VIDEOS.NAME.max,
+ 'separator': /,? +/,
+ 'omission': ' […]'
+ }),
category,
licence,
language,