I try to construct a simple 10.5mb Blob
using the following (Chrome browser):
var arr = new Uint8Array(10485833);
var blob = new Blob(arr, { type: 'application/octet-stream' });
I get the error:
Uncaught RangeError: Failed to construct 'Blob': Array length exceeds supported limit.
What is the limit? Why can't I create a 10mb blob? What if I wanted to create a 50mb blob? 1gb blob?
Is Blob
the wrong data type to be using here? In the end I am trying to construct some FormData
to post to a server. Example:
var fd = new FormData();
var blob = new Blob(arr, { type: 'application/octet-stream' });
fd.append('data', blob, 'filename.zip');