gagle / node-streamifier

Converts a Buffer/String to a readable stream.
MIT License
149 stars 12 forks source link

could not create stream like fs.createReadStream #3

Open taoqf opened 6 years ago

taoqf commented 6 years ago

https://github.com/stream-utils/contentstream/issues/6 https://github.com/paulja/memory-streams-js/issues/11 I have tried them all. they all get the same exception at server side

Error: MultipartParser.end(): stream ended unexpectedly: state = PART_DATA

Server Side

import { IncomingForm, Files } from 'formidable';
const form = new IncomingForm();   //create upload form
form.encoding = FILE_ENCODE;
form.keepExtensions = true;
form.multiples = true;
console.log(`file parse start!`);
form.parse(req, function (err, fields, files) {
// get Exception err =  Error: MultipartParser.end(): stream ended unexpectedly: state = PART_DATA
});
sapinder commented 5 years ago

I am facing the same issue, is any able to find the work around?

taoqf commented 5 years ago

I am sorry, I could not remember.