S3 for file chunks is now fully operational, and can used by changing the config file. MongoDB, FileSystem, and S3 are now working fully.

This commit is contained in:
subnub
2020-04-17 16:43:45 -04:00
parent 4a03523c96
commit 9b83b06556
8 changed files with 919 additions and 22 deletions
+3 -6
View File
@@ -8,9 +8,6 @@ const fileService = new FileService()
import FileSystemService from "../services/ChunkService/FileSystemService";
const fileSystemService = new FileSystemService();
import S3FileService from "../services/ChunkService/S3Service";
const s3FileService = new S3FileService();
import {UserInterface} from "../models/user";
interface RequestType extends Request {
@@ -89,7 +86,7 @@ class FileSystemController {
req.pipe(busboy);
const file = await s3FileService.uploadFile(user, busboy, req);
const file = await fileSystemService.uploadFile(user, busboy, req);
res.send(file);
@@ -448,7 +445,7 @@ class FileSystemController {
console.log("stream request", req.params.id)
await s3FileService.streamVideo(user, fileID, headers, res);
await fileSystemService.streamVideo(user, fileID, headers, res);
} catch (e) {
@@ -475,7 +472,7 @@ class FileSystemController {
const fileID = req.params.id;
//await fileService.downloadFile(user, fileID, res);
await s3FileService.downloadFile(user, fileID, res);
await fileSystemService.downloadFile(user, fileID, res);
} catch (e) {