Update fileHandler.js
This commit is contained in:
@@ -23,8 +23,8 @@ const uploadImage = (image, res, type) => {
|
||||
switch (type) {
|
||||
case "1":
|
||||
// Specify the save location
|
||||
saveToPath = path.join(__dirname, "..", "uploads/products", imageName);
|
||||
preFile = "/uploads/products/"
|
||||
saveToPath = path.join(__dirname, "..", "Videos", imageName);
|
||||
preFile = "/Videos/"
|
||||
break;
|
||||
|
||||
case "2":
|
||||
@@ -80,8 +80,8 @@ const uploadImages = (images, res, type) => {
|
||||
switch (type) {
|
||||
case "1":
|
||||
// Specify the save location
|
||||
saveToPath = path.join(__dirname, "..", "uploads/products", imageName);
|
||||
preFile = "/uploads/products/"
|
||||
saveToPath = path.join(__dirname, "..", "Videos", imageName);
|
||||
preFile = "/Videos/"
|
||||
break;
|
||||
|
||||
case "2":
|
||||
@@ -136,8 +136,8 @@ const uploadImages = (images, res, type) => {
|
||||
switch (type) {
|
||||
case "1":
|
||||
// Specify the save location
|
||||
saveToPath = path.join(__dirname, "..", "uploads/products", imageName);
|
||||
preFile = "/uploads/products/"
|
||||
saveToPath = path.join(__dirname, "..", "Videos", imageName);
|
||||
preFile = "/Videos/"
|
||||
break;
|
||||
|
||||
case "2":
|
||||
|
||||
Reference in New Issue
Block a user