mirror of
https://github.com/Dangoware/confetti-box.git
synced 2025-06-22 22:53:02 -05:00
Properly URI encode filename on websocket upload
This commit is contained in:
parent
a782ce29f2
commit
44e94e4772
1 changed files with 1 additions and 1 deletions
|
@ -218,7 +218,7 @@ async function uploadFileWebsocket(file, duration, maxSize) {
|
|||
new_uri = "ws:";
|
||||
}
|
||||
new_uri += "//" + loc.host;
|
||||
new_uri += "/upload/websocket?name=" + file.name +"&size=" + file.size + "&duration=" + parseInt(duration);
|
||||
new_uri += "/upload/websocket?name=" + encodeURIComponent(file.name) +"&size=" + file.size + "&duration=" + parseInt(duration);
|
||||
const socket = new WebSocket(new_uri);
|
||||
socket.binaryType = "arraybuffer";
|
||||
|
||||
|
|
Loading…
Reference in a new issue