View on GitHub
 (3 comments) (0 reactions) (0 assignees)JavaScript (33 forks)github user discovery
bughelp wanted

Repository metrics

Stars
 (29 stars)
PR merge metrics
 (PR metrics pending)

Description

hi, maybe it's is an issue:

FileInfo.prototype.safeName = function () { // Prevent directory traversal and creating hidden system files: this.name = path.basename(this.name).replace(/^.+/, ''); // Prevent overwriting existing files: while (_existsSync(options.uploadDir + '/' + this.name)) { this.name = this.name.replace(nameCountRegexp, nameCountFunc); } };

The options.uploadDir should be options.getDirectory() ?

For example, img.png is in /dir1, when another img.png uploaded, there will be error throw out. Am I right?

Thank you, I like your this upload package.

  • Henry

Contributor guide