Skip to content

Commit 30fd4f2

Browse files
authored
Merge pull request #2 from StefanoF/master
Fix file uploads error
2 parents bbaa9e1 + 244b416 commit 30fd4f2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

js/plainwebrtc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ function fileChannel(e){
147147
}
148148
}else if(type == "[object String]"){
149149
data = JSON.parse(e.data);
150+
}else if(type == "[object Blob]"){
151+
data = e.data;
152+
file_download.href=URL.createObjectURL(data);
153+
file_download.innerHTML="download";
154+
file_download.download = recFileDom.name;
150155
}
151156

152157
// Handle initial msg exchange

0 commit comments

Comments
 (0)