Recently I've been thinking how to make http-request upload a file, but not from the hard drive but from a function which can produce (or write to a) stream. Let's say I want to create an image with cl-gd but instead of writing the image to the file and then creating the http-request with a pathname of the file I can pass a (lambda (stream) (cl-gd-create-image stream your param1 param2)) in place of the pathname parameter. Or a stream which already has the file data. I was trying to do it using :content :continuation but found it too difficult, maybe I missed other ways. Anyway, I created a patch with very minimal changes to the make-form-data-function function which allows to do so. Also I found that I set *header-stream* to not nil, I was missing the debug output produced by the character (character only) stream from make-form-data-function which basically shows all the parameters we are sending. I added the primitive support for this based on make-broadcast-stream. Here I attach the patch for your kind consideration.
Thank you, Andrew