Mohamed Abu Basith commited on
Commit
b8c3484
·
1 Parent(s): e0676fa
Files changed (1) hide show
  1. routes/profileUpdate.js +1 -1
routes/profileUpdate.js CHANGED
@@ -49,7 +49,7 @@ router.post('/', upload.single('file'), async (req, res) => {
49
  }
50
 
51
  // Handle file upload to Firebase Storage
52
- if (req.file) {
53
  const filePath = req.file.path; // Path to the uploaded file
54
  const imageName = req.file.filename; // Name of the uploaded file
55
 
 
49
  }
50
 
51
  // Handle file upload to Firebase Storage
52
+ if (req.file || req.body.file) {
53
  const filePath = req.file.path; // Path to the uploaded file
54
  const imageName = req.file.filename; // Name of the uploaded file
55