unknown 2 years ago
parent
commit
b77732df5f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      controllers/messages.js

+ 2 - 2
controllers/messages.js

@@ -259,10 +259,10 @@ const audioMessage = async (req, res, next) => {
 		const fileName = req.file.fileName;
 		const newNameAudio = `${Math.round(Date.now() / 1000)}${originalName}`;
 		const fullType = req.file.mimetype;
-		await createFolderIsExist(path.join(DIR_AUDIOS, userId));
+		await createFolderIsExist(path.join(DIR_IMAGES, userId));
 		await fs.rename(
 			path.join(DIR_UPLOAD, fileName),
-			path.join(DIR_AUDIOS, userId, newNameAudio)
+			path.join(DIR_IMAGES, userId, newNameAudio)
 		);
 		const audioUrl = path.normalize(path.join(userId, newNameAudio));
 		if (isChat && isCompanionChat && audioUrl) {