next debug

This commit is contained in:
dbroqua 2019-03-12 23:03:03 +01:00
parent 1406f4645b
commit 51e379f104

View file

@ -44,6 +44,7 @@ class Aws {
const newFile = params.path + '.' + params.filename.split('.')[1]
fs.copyFile(params.path, newFile, (err, res) => {
console.log('_compress => copyFile')
if (err) {
callback(err, null)
return false
@ -60,6 +61,8 @@ class Aws {
]
})
console.log('Après imagemin')
this._send({
path: file[0].path,
filename: params.filename
@ -69,6 +72,7 @@ class Aws {
})
})()
} catch (e) {
console.log('Error:', e)
callback(e)
}
})
@ -81,6 +85,7 @@ class Aws {
*/
upload (params, callback) {
fs.readFile(params.path, (err, data) => {
console.log('après upload -> readfile')
if (err) {
callback(err, null)
return false