This commit is contained in:
dbroqua 2019-03-12 23:08:50 +01:00
parent 51e379f104
commit 8b8f20a6d1

View file

@ -52,23 +52,24 @@ class Aws {
try { try {
(async () => { (async () => {
const file = await imagemin([newFile], '/tmp', { // const file = await imagemin([newFile], '/tmp', {
plugins: [ // plugins: [
imageminJpegtran(), // imageminJpegtran(),
imageminPngquant({ // imageminPngquant({
quality: '65-80' // quality: '65-80'
}) // })
] // ]
}) // })
console.log('Après imagemin') // console.log('Après imagemin')
this._send({ this._send({
path: file[0].path, path: newFile,
// path: file[0].path,
filename: params.filename filename: params.filename
}, (err, res) => { }, (err, res) => {
callback(err, res) callback(err, res)
fs.unlink(file[0].path, () => { }) // fs.unlink(file[0].path, () => { })
}) })
})() })()
} catch (e) { } catch (e) {