The third-party libraries \"node-formidable\" and \"express\" come with the ability to handle multipart POST requests (e.g. with a file upload form), but I don\'t want to us
I think you need to parse form by yourself if you don't want to use any modules very much. When uploading a file, the form will be in multipart/form-data
format, which means your request content will be divided by a string that is generated randomly by your browser. You need to read this string at the beginning of the form, try to load data and find this string, then parse them one by one.
For more information about multipart/form-data
you can refer http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2
I think the best solution is to use formidable
. It handles vary scenarios and works prefect I think.