I'm trying to create a simple image host in Node.js, but i'm having trouble parsing form-data
The form my test application generates (to upload an image) posts the data in the following format:
----------------------8d8317fa35f1280
Content-Disposition: form-data; name="ImageUploader"; filename="Test.png"
Content-Type: image/png
<binary PNG data...>
----------------------8d8317fa35f1280--
I plan on storing the image data in a key-value database, where the key is an md5 hash of the file, and the value is the raw .png data.
I know that this is very possible with the 'express' javascript framework, but I don't wish to use any frameworks, i'm open to using a library, given that it is fast.
I would like to avoid Regex
How can I parse the filename, and the raw .png data out of this form submission data?