Skip to content

Commit

Permalink
Update fetcher.js
Browse files Browse the repository at this point in the history
  • Loading branch information
SlavyanDesu authored Dec 31, 2020
1 parent f31baca commit 9b1f695
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ const uploadImages = (buffData, fileName) => {
if (result.error) return reject(result.error)
resolve('https://telegra.ph' + result[0].src)
})
.then(() => fs.unlinkSync(filePath))
.then(() => {
fs.unlinkSync(filePath)
console.log('Success!')
})
.catch((err) => reject(err))
})
})
Expand Down

0 comments on commit 9b1f695

Please sign in to comment.