express-fileupload
Advanced tools
Comparing version 1.1.6-alpha.2 to 1.1.6-alpha.3
@@ -157,4 +157,10 @@ 'use strict'; | ||
const moveFile = (src, dst, callback) => { | ||
// Copy file to dst and delete src whether success. | ||
copyFile(src, dst, err => err ? callback(err) : deleteFile(src, callback)); | ||
fs.rename(src, dst, err => { | ||
if (err) { | ||
// Copy file to dst and delete src whether success. | ||
copyFile(src, dst, err => err ? callback(err) : deleteFile(src, callback)); | ||
return; | ||
} | ||
callback(); | ||
}); | ||
}; | ||
@@ -161,0 +167,0 @@ |
{ | ||
"name": "express-fileupload", | ||
"version": "1.1.6-alpha.2", | ||
"version": "1.1.6-alpha.3", | ||
"author": "Richard Girges <richardgirges@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "Simple express file upload middleware that wraps around Busboy", |
@@ -21,3 +21,4 @@ 'use strict'; | ||
saveBufferToFile, | ||
parseFileName | ||
parseFileName, | ||
uriDecodeFileName | ||
} = require('../lib/utilities'); | ||
@@ -24,0 +25,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1205638
2171