Browse Source

add url encoding

encrypt 7 years ago
parent
commit
bc5bd0308b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      client/main.js

+ 1 - 1
client/main.js

@@ -15,7 +15,7 @@ var Uploader = {
 
     getFile: function(fileName, callback) {
 	var xhr = new XMLHttpRequest();
-	xhr.open('GET', '/room/'+this.roomId+'/'+fileName, true);
+	xhr.open('GET', '/room/'+this.roomId+'/'+encodeURIComponent(fileName), true);
 	xhr.responseType = 'arraybuffer';
 	xhr.onload = callback;
 	xhr.send();