MultiPart HTTP requests

David Faure faure at kde.org
Sat Dec 6 10:44:39 UTC 2014


On Friday 05 December 2014 16:14:45 Aleix Pol wrote:
> Hi all,
> Every now and then I end up having to generate MultiPart HTTP requests to
> implement some of those fancy HTTP API's to upload images.
> 
> I know we have many implementation for this, namely one in kipi, then
> forked in ktp [1], one in kdevplatform reviewboard plugin, and probably
> some more. In fact I'll have to add another implementation in Kamoso as
> well.
> 
> With this e-mail, I wanted to suggest to move such MPForm into KF5 (KIO?
> KCoreAddons?) so we can re-use it, and maybe hopefully not scare people
> from implementing such API's, because it helps saving some tricky code
> anyway.
> 
> Aleix
> 
> [1]
> http://quickgit.kde.org/?p=ktp-text-ui.git&a=blob&f=image-sharer%2Fmpform.h
> http://quickgit.kde.org/?p=ktp-text-ui.git&a=blob&f=image-sharer%2Fmpform.cp
> p

There are more indeed, I made a list at some point:

QHttpMultiPart
khtml html_formimpl.cpp
extragear/graphics/kipi-plugins/*/*mpform*
/WebCore/platform/network/FormDataBuilder.cpp

and the validator and babelfish plugins need this too.

Did you look into QHttpMultiPart? Could it be used for all this?
If not, I'd recommend adding what's missing to it.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5



More information about the Kde-frameworks-devel mailing list