Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return unlink(filePath).then(() => {
// password for the dropbox sample zip file
const password = 'helloworld'
return zipWithPassword(
filePath.split('.').slice(0, -1).join('.'),
filePath,
password
).then((response) => {
console.log('Successfully archived the folder')
console.log(response)
}).catch((err) => {
console.log(err)
})
}).catch((err) => {
console.log(err)