Closed movepointsolutions closed 1 year ago
Can it be done such a way it would work both for emails and http streams? Above example prints filename as a name for attached file, but part names set in content-disposition headers are lost :(
Here's how a typical file upload looks loike:
-----------------------------1182853161458354044109031061
Content-Disposition: form-data; name="nickname"
Anek
-----------------------------1182853161458354044109031061
Content-Disposition: form-data; name="text"
1
-----------------------------1182853161458354044109031061
Content-Disposition: form-data; name="file"; filename="1.txt"
Content-Type: text/plain
-----------------------------1182853161458354044109031061
Content-Disposition: form-data; name="submit"
Send
-----------------------------1182853161458354044109031061--
As commented in the PR, there is no sense to mix the HTTP with email protocols.
here I output MIME parts names, but they are empty, as mailio doesn't handle this particular formdata content-type and doesn't extract name= (and filename=) from there. I was too lazy to handle multipart/form-data and boost.beast lacks its support too, so I need to contribute to one of these 2 projects (beast and mailio)