Now that we have the required dependencies, we will update the routes. To work with the Video Intelligence API feature, we are going to add only one new route, which will accept a file, process it, and respond based on the response from Video Intelligence API. Update server/routes/cloud-ai-api.ts and add the upload-video route, as shown here:
// SNIPP SNIPP
// Upload Single Images
router.post('/upload-image/:threadId', Authenticate, Authorize('user'), upload.single('image-reply'), cloudAIAPI.uploadImage);
// Upload Single Video
router.post('/upload-video/:threadId', Authenticate, Authorize('user'), upload.single('video-reply'), cloudAIAPI.uploadVideo);
// SNIPP SNIPP