You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error:
$node server.js
uncaughtException
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at makeCallback (fs.js:135:11)
at Object.mkdir (fs.js:711:16)
at new Fileupload
node_modules\dpd-fileupload\index.js:50:12)
Current Code: at line no. 88 in index.js
// If the directory doesn't exists, we'll create it
try {
fs.statSync(this.config.fullDirectory).isDirectory();
} catch (er) {
fs.mkdir(this.config.fullDirectory);
}
fs.mkdir(this.config.fullDirectory); - need to add a callback to handle error.
FiX:
// If the directory doesn't exists, we'll create it
try {
fs.statSync(this.config.fullDirectory).isDirectory();
} catch (er) {
fs.mkdir(this.config.fullDirectory,```
function(err) {
if (err) {}}
}
The text was updated successfully, but these errors were encountered:
ezra-obiwale
added a commit
to ezra-obiwale/dpd-fileupload
that referenced
this issue
Jul 24, 2019
Error:
$node server.js
uncaughtException
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at makeCallback (fs.js:135:11)
at Object.mkdir (fs.js:711:16)
at new Fileupload
node_modules\dpd-fileupload\index.js:50:12)
Current Code: at line no. 88 in index.js
// If the directory doesn't exists, we'll create it
try {
fs.statSync(this.config.fullDirectory).isDirectory();
} catch (er) {
fs.mkdir(this.config.fullDirectory);
}
fs.mkdir(this.config.fullDirectory); - need to add a callback to handle error.
FiX:
// If the directory doesn't exists, we'll create it
try {
fs.statSync(this.config.fullDirectory).isDirectory();
} catch (er) {
fs.mkdir(this.config.fullDirectory,```
function(err) {
if (err) {}}
The text was updated successfully, but these errors were encountered: