Added debug mode
This commit is contained in:
parent
43a5234ab3
commit
1406f4645b
2 changed files with 10 additions and 3 deletions
|
@ -19,6 +19,7 @@ class Resize {
|
|||
|
||||
_resize (input, output, callback) {
|
||||
fs.readFile(input, (err, data) => {
|
||||
console.log('après readfile')
|
||||
if (err) {
|
||||
callback(err, null)
|
||||
return false
|
||||
|
@ -26,7 +27,9 @@ class Resize {
|
|||
|
||||
resizeImg(data, this.size)
|
||||
.then(buf => {
|
||||
console.log('then rezise')
|
||||
fs.writeFile(output, buf, (err) => {
|
||||
console.log('write file')
|
||||
if (err) {
|
||||
callback(err, null)
|
||||
return false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue