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

Most upvoted comments

Convert it to base64, binary data seems to not be supported yet.