Fix
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
const express = require("express");
|
const express = require("express");
|
||||||
const errorHandler = require("./middleware/errorHandler");
|
const errorHandler = require("./middleware/errorHandler");
|
||||||
|
const videovalidate = require("./middleware/vidoeValidate");
|
||||||
const db = require("./config/dbConnectoin");
|
const db = require("./config/dbConnectoin");
|
||||||
const fileUpload = require("express-fileupload");
|
const fileUpload = require("express-fileupload");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
@@ -29,7 +30,9 @@ app.use(autoFetch(express, pAddress = "hasPermission", cAddress = "Admin", mAddr
|
|||||||
app.use('/uploads', expressSharp({
|
app.use('/uploads', expressSharp({
|
||||||
imageAdapter: new FsAdapter(path.join(__dirname, 'uploads')),
|
imageAdapter: new FsAdapter(path.join(__dirname, 'uploads')),
|
||||||
}));
|
}));
|
||||||
|
app.use('/vid', videovalidate.run, expressSharp({
|
||||||
|
imageAdapter: new FsAdapter(path.join(__dirname, 'Data')),
|
||||||
|
}));
|
||||||
//Error handler
|
//Error handler
|
||||||
app.use(errorHandler.run);
|
app.use(errorHandler.run);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user