I want to allow users to use a form to upload (POST) an image file to my Express.js web application. Upon receipt, my web application will POST it to the GetChute API (an image web service).
I don't want my server temporarily writing the image to disk - instead it should store the image to a variable, and send it to GetChute.
By default, 2 Express middleware items (Connect and Formidable) I think are providing a nice way of automatically doing disk writes from POSTs, but how would I circumvent them to directly access the bytestream so I can avoid a disk write?
I suspect that someone smarter than me can come up with a tidier solution than was arrived at for a similar question recently:
Stream file uploaded with Express.js through gm to eliminate double write
Thanks!