i'm fiddling around with WebRTC
file sharing, but now encountered a problem with blob
. It seems that (atleast on google chrome) there is a limit of 500mb for blob file.
My Reciever recieves ArrayBuffers
and makes blobs out of them, which is stored then in array. When the last ArrayBuffer
is recieved - one big blob is constructed, link is made and given to user to download a file. I was trying to send 800mb file but big blob is caped at 500mb and therefore file is corrupted. As i understand it's a well known blob memory limit, and it is somehow can be bypassed (i suppose https://www.sharefest.me/ did it?), but how?
Or maybe there is some another way for the user to get a link to combined arraybuffers and save them as a file?
Here's my reciever's code:
var finalBlob;
var ind = 0;
var f = files_r[ind];//file
var part = f.currentChunk;
var blobs = f.fileblobs;
blobs.push(new Blob([data], {
type: f.mime
}));
f.currentChunk++;
if (f.currentChunk === f.totalchunks) {
finalBlob = new Blob(blobs, {
type: f.mime
});
var link = g(ind + '_link');
var url = URL.createObjectURL(finalBlob);
link.href = url;
link.download = f.name;
console.log("finished");
}