<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Dec 6, 2014 at 11:44 AM, David Faure <span dir="ltr"><<a href="mailto:faure@kde.org" target="_blank">faure@kde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Friday 05 December 2014 16:14:45 Aleix Pol wrote:<br>
> Hi all,<br>
> Every now and then I end up having to generate MultiPart HTTP requests to<br>
> implement some of those fancy HTTP API's to upload images.<br>
><br>
> I know we have many implementation for this, namely one in kipi, then<br>
> forked in ktp [1], one in kdevplatform reviewboard plugin, and probably<br>
> some more. In fact I'll have to add another implementation in Kamoso as<br>
> well.<br>
><br>
> With this e-mail, I wanted to suggest to move such MPForm into KF5 (KIO?<br>
> KCoreAddons?) so we can re-use it, and maybe hopefully not scare people<br>
> from implementing such API's, because it helps saving some tricky code<br>
> anyway.<br>
><br>
> Aleix<br>
><br>
> [1]<br>
> <a href="http://quickgit.kde.org/?p=ktp-text-ui.git&a=blob&f=image-sharer%2Fmpform.h" target="_blank">http://quickgit.kde.org/?p=ktp-text-ui.git&a=blob&f=image-sharer%2Fmpform.h</a><br>
> <a href="http://quickgit.kde.org/?p=ktp-text-ui.git&a=blob&f=image-sharer%2Fmpform.cp" target="_blank">http://quickgit.kde.org/?p=ktp-text-ui.git&a=blob&f=image-sharer%2Fmpform.cp</a><br>
> p<br>
<br>
</div></div>There are more indeed, I made a list at some point:<br>
<br>
QHttpMultiPart<br>
khtml html_formimpl.cpp<br>
extragear/graphics/kipi-plugins/*/*mpform*<br>
/WebCore/platform/network/FormDataBuilder.cpp<br>
<br>
and the validator and babelfish plugins need this too.<br>
<br>
Did you look into QHttpMultiPart? Could it be used for all this?<br>
If not, I'd recommend adding what's missing to it.<br></blockquote><div><br></div><div>I didn't know about QHttpMultiPart indeed, I'll see what needs to be done in my code to adopt it and try to come to a conclusion.</div><div><br></div><div>Merci beaucoup, David!!</div><div>Aleix</div></div></div></div>