|
@@ -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) {
|