MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / encodeBlobAsArrayBuffer

Function encodeBlobAsArrayBuffer

public/javascripts/socket.io.js:5686–5697  ·  view source on GitHub ↗
(packet, supportsBinary, callback)

Source from the content-addressed store, hash-verified

5684 }
5685
5686 function encodeBlobAsArrayBuffer(packet, supportsBinary, callback) {
5687 if (!supportsBinary) {
5688 return exports.encodeBase64Packet(packet, callback);
5689 }
5690
5691 var fr = new FileReader();
5692 fr.onload = function() {
5693 packet.data = fr.result;
5694 exports.encodePacket(packet, supportsBinary, true, callback);
5695 };
5696 return fr.readAsArrayBuffer(packet.data);
5697 }
5698
5699 function encodeBlob(packet, supportsBinary, callback) {
5700 if (!supportsBinary) {

Callers 1

encodeBlobFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected