Skip to content

Commit

Permalink
Correção no nome dos arquivos salvos na pasta public do backend
Browse files Browse the repository at this point in the history
  • Loading branch information
rtenorioh authored Jun 30, 2022
1 parent 3fa28a5 commit 38ce3a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/config/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export default {
storage: multer.diskStorage({
destination: publicFolder,
filename(req, file, cb) {
const fileName = new Date().getTime() + path.extname(file.originalname);
const fileName = new Date().getTime() + "_" + file.originalname;

return cb(null, fileName);
}
})
};
};

0 comments on commit 38ce3a6

Please sign in to comment.