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