(file)
| 118 | } |
| 119 | |
| 120 | _sendFile(file) { |
| 121 | this.sendJSON({ |
| 122 | type: 'header', |
| 123 | name: file.name, |
| 124 | mime: file.type, |
| 125 | size: file.size |
| 126 | }); |
| 127 | this._chunker = new FileChunker(file, |
| 128 | chunk => this._send(chunk), |
| 129 | offset => this._onPartitionEnd(offset)); |
| 130 | this._chunker.nextPartition(); |
| 131 | } |
| 132 | |
| 133 | _onPartitionEnd(offset) { |
| 134 | this.sendJSON({ type: 'partition', offset: offset }); |
no test coverage detected