Skip to content

Commit

Permalink
fix wrong id replace
Browse files Browse the repository at this point in the history
  • Loading branch information
aseduto committed Dec 5, 2018
1 parent 834f81e commit 23e9972
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "0.0.7",
"version": "0.0.8",
"description": "A Browser to node.js chunked uploader",
"main": "src/server.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions src/client.js
Expand Up @@ -240,7 +240,7 @@ class UploadManager extends EventEmitter {

add(file, id, options)
{
if(null != this.uploader[id])
if(undefined !== this.uploader[id])
{
throw 'uploader already exist';
}
Expand Down Expand Up @@ -312,10 +312,10 @@ class UploadManager extends EventEmitter {
let file = files[i];

let id = file.name;
id = id.replace(/./g, '_');
id = id.replace(/\./g, '_');
id = id.replace(/ /g, '_');
id = id.replace(/&/g, '_');
//id = id.replace(' ', '_');
//id = id.replace(/./g, '_');

this.add(file, id);

Expand Down

0 comments on commit 23e9972

Please sign in to comment.