Just got an error:
Argument of type 'Blob' is not assignable to parameter of type 'string | Blob'.
Type 'import("buffer").Blob' is not assignable to type 'Blob'.
The types returned by 'stream()' are incompatible between these types.
Type '{}' is missing the following properties from type 'ReadableStream<any>': locked, cancel, getReader, pipeThrough, and 2 more.
And can't understand what's going on. Tried to restart vscode but didn't help. Blob
is not assignable to param of type Blob
. ?! So Blob
returned by stream is not the same with usual Blob
?
This is my code
const audioBuffer = fs.readFileSync(`./uploads/audio/${filePath}`)
const audioBlob = new Blob([audioBuffer])
const formData = new FormData()
formData.append('file', audioBlob)
Error is showing when i'm trying to append file to formdata
import { Blob } from 'buffer'
but formdata -no – Huntington