Skip to content

Commit f9765c1

Browse files
committed
File Name
1 parent 508f15f commit f9765c1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

shopping-cart/utils/routes.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,7 @@ class Routes{
166166
destination: './client/uploads/',
167167
filename: function (request, file, cb) {
168168
var d = new Date();
169-
cb(null, file.originalname.replace(path.extname(file.originalname), "") + '-' + d.getDate() + '-' + (d.getMonth()+1) + '-' + d.getFullYear() + '-' + Date.now() + path.extname(file.originalname))
170-
console.log('request: ' + request +', file: '+file+ ', cb: '+cb + ', path: ' + path);
169+
cb(null, 'img' + '-' + d.getDate() + (d.getMonth()+1) + d.getFullYear() + '-' + Date.now() + path.extname(file.originalname))
171170
}
172171
})
173172

0 commit comments

Comments
 (0)