This commit is contained in:
les
2019-09-11 19:12:24 +02:00
parent 93baf01a55
commit 2fe956d117
65 changed files with 762 additions and 721 deletions

View File

@@ -13,7 +13,7 @@ try {
}
const DiskStorage = {
_handleFile(req, file, cb) {
_handleFile (req, file, cb) {
const filename = crypto.randomBytes(16).toString('hex') + '.jpg'
const finalPath = path.resolve(config.upload_path, filename)
const thumbPath = path.resolve(config.upload_path, 'thumb', filename)
@@ -36,7 +36,7 @@ const DiskStorage = {
})
})
},
_removeFile(req, file, cb) {
_removeFile (req, file, cb) {
delete file.destination
delete file.filename
delete file.path