import { buildNextVideoState } from '@server/lib/video-state'
import { openapiOperationDoc } from '@server/middlewares/doc'
import { MVideo, MVideoFile, MVideoFullLight } from '@server/types/models'
-import { getLowercaseExtension, uuidToShort } from '@shared/core-utils'
-import { isAudioFile } from '@shared/extra-utils'
-import { VideoCreate, VideoState } from '../../../../shared'
-import { HttpStatusCode, VideoResolution } from '../../../../shared/models'
+import { getLowercaseExtension } from '@shared/core-utils'
+import { isAudioFile, uuidToShort } from '@shared/extra-utils'
+import { HttpStatusCode, VideoCreate, VideoResolution, VideoState } from '@shared/models'
import { auditLoggerFactory, getAuditIdFromRes, VideoAuditView } from '../../../helpers/audit-logger'
import { retryTransactionWrapper } from '../../../helpers/database-utils'
import { createReqFiles } from '../../../helpers/express-utils'
authenticate,
videosAddLegacyValidator,
videosAddResumableInitValidator,
- videosAddResumableValidator,
- videosResumableUploadIdValidator
+ videosAddResumableValidator
} from '../../../middlewares'
import { ScheduleVideoUpdateModel } from '../../../models/video/schedule-video-update'
import { VideoModel } from '../../../models/video/video'
uploadRouter.delete('/upload-resumable',
authenticate,
- videosResumableUploadIdValidator,
asyncMiddleware(deleteUploadResumableCache),
uploadx.upload
)
uploadRouter.put('/upload-resumable',
openapiOperationDoc({ operationId: 'uploadResumable' }),
authenticate,
- videosResumableUploadIdValidator,
uploadx.upload, // uploadx doesn't next() before the file upload completes
asyncMiddleware(videosAddResumableValidator),
asyncMiddleware(addVideoResumable)