File upload API not accepting readable stream

I use Multer memory storage to upload files to my app, and i need to upload the file to open ai const response = await openai.files.create({ file: bufferStream, purpose: 'assistants', }); and then use the file id for assistant api call.

I’ve used this `const bufferStream = new Readable();
bufferStream._read = () => {}; // No-op

bufferStream.push(file.buffer);
bufferStream.push(null);code to convert the buffer to stream. but i'm getting thisInvalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got () => { } instead`

any help on what kind of file is acceptable?

Same issue here, tried different approaches - also with the help of o1 ;-)…
Nothing worked.
It only works if you store the stream to local file and upload it from there.
Very ugly …