next debug
This commit is contained in:
parent
1406f4645b
commit
51e379f104
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue