]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/initializers/installer.ts
Add transcoding fail message in client
[github/Chocobozzz/PeerTube.git] / server / initializers / installer.ts
index cb58454cb650be3edcda509ea0353eda99797092..75daeb5d89e55792c5a2e236caef15e64737db0d 100644 (file)
@@ -1,15 +1,15 @@
-import * as passwordGenerator from 'password-generator'
+import { ensureDir, remove } from 'fs-extra'
+import passwordGenerator from 'password-generator'
 import { UserRole } from '../../shared'
 import { logger } from '../helpers/logger'
 import { createApplicationActor, createUserAccountAndChannelAndPlaylist } from '../lib/user'
-import { UserModel } from '../models/account/user'
 import { ApplicationModel } from '../models/application/application'
 import { OAuthClientModel } from '../models/oauth/oauth-client'
+import { UserModel } from '../models/user/user'
 import { applicationExist, clientsExist, usersExist } from './checker-after-init'
-import { FILES_CACHE, HLS_STREAMING_PLAYLIST_DIRECTORY, LAST_MIGRATION_VERSION } from './constants'
-import { sequelizeTypescript } from './database'
-import { ensureDir, remove } from 'fs-extra'
 import { CONFIG } from './config'
+import { FILES_CACHE, HLS_STREAMING_PLAYLIST_DIRECTORY, LAST_MIGRATION_VERSION, RESUMABLE_UPLOAD_DIRECTORY } from './constants'
+import { sequelizeTypescript } from './database'
 
 async function installApplication () {
   try {
@@ -79,6 +79,9 @@ function createDirectoriesIfNotExist () {
   // Playlist directories
   tasks.push(ensureDir(HLS_STREAMING_PLAYLIST_DIRECTORY))
 
+  // Resumable upload directory
+  tasks.push(ensureDir(RESUMABLE_UPLOAD_DIRECTORY))
+
   return Promise.all(tasks)
 }