Closed josesuero closed 5 years ago
I also tried creating a readable stream like:
const buffer = new Buffer(fileReader.result, 'base64')
const readable = new Readable()
readable._read = () => { } // _read is required but you can noop it
readable.push(buffer)
readable.push(null)
readable.pipe(reader) // consume the stream
but I got bad "chunk id": expected "RIFF" or "RIFX", got "u+Zj"
On NodeJS this files gets processed correctly
Got it, it was a problem with Base64 string, thanks again for a great library
I need to verify the specs of a wav file on my frond-end before uploading, I currently have a the base64 of the file which i'm converting to a readable stream using fetch:
const fileReader = new FileReader(); fileReader.onloadend = () => {
But browser stream does not have a pipe method, is there a way I can pass a stream (or a buffer) to a function on the reader in order to get the header?
thanks in advance