peerjs: Can't send blob file
I’m trying to send a file drag and dropped in a div, but i always get this error. Error: Type “function Blob() { [native code] }” not yet supported.
sendFiles(fileList) {
Array.from(fileList).forEach(file => {
const blob = new Blob([file], { type: file.type });
this.conn.send({
op: operation.FILE,
file: blob,
filename: file.name,
filetype: file.type
});
});
}
I tryed to send directly File Object, Blob or ArrayBuffer. Got always the same error
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 18 (7 by maintainers)
Commits related to this issue
- Downgrade peerjs to 1.3.2 in order to avoid issues https://github.com/peers/js-binarypack/issues/61 and https://github.com/peers/peerjs/issues/540 — committed to LetMeDream/Another-Chat by LetMeDream 7 months ago
Convert it to base64, binary data seems to not be supported yet.