<div dir="ltr">Hello all<br><br>Yes, I think that's a good suggestion by Alexander that while factorizing a common API in libkipiplugin for mpform using QHttpMultiPart can be created. I will keep in mind while doing the factorization. Also, it would be interesting to see whether it provides improvement in memory usage or not.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 18, 2015 at 6:26 PM, Gilles Caulier <span dir="ltr"><<a href="mailto:caulier.gilles@gmail.com" target="_blank">caulier.gilles@gmail.com</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">2015-05-18 14:44 GMT+02:00 Alexander Potashev <<a href="mailto:aspotashev@gmail.com">aspotashev@gmail.com</a>>:<br>
> Hi Gilles,<br>
><br>
> Please find my comments below.<br>
><br>
> 2015-05-18 9:04 GMT+03:00 Gilles Caulier <<a href="mailto:caulier.gilles@gmail.com">caulier.gilles@gmail.com</a>>:<br>
>> 2015-05-17 23:45 GMT+02:00 Alexander Potashev <<a href="mailto:aspotashev@gmail.com">aspotashev@gmail.com</a>>:<br>
>>> Another commit I have just pushed removes the files mpform.* in favor<br>
>>> of my own code for HTTP multi-part requests using<br>
>>> QHttpMultiPart/QNetworkAccessManager.<br>
>><br>
>> This way permit to be logged to a remote service without to use an<br>
>> external session of  web browser as it's done in all web service kipi<br>
>> tools ? If yes, this solution must be the good way to apply in a<br>
>> common class from internal libkipiplugins (not libkipi) to generalize<br>
>> this authentification method.<br>
>><br>
>> Remember that we have a student who will work on kipi-plugins core to<br>
>> factorize all web service tool codes.<br>
><br>
> No, it is not about authentication. The multi-part request is only<br>
> used to actually upload photos.<br>
><br>
> But there are more advantages in using QHttpMultiPart besides licensing:<br>
>  1. We reduce the amount of code.<br>
>  2. This way we do not prepare the whole request (possibly<br>
> multi-megabyte) in a QByteArray. In my indestanding,<br>
> QNetworkAccessManager reads the images from disk as soon as they are<br>
> ready to be uploaded, thus preventing peaks in memory usage. I did not<br>
> actually check the memory usage though.<br>
><br>
> It may be interesting to factorize the code around QHttpMultiPart I<br>
> added in libkvkontakte/photopostjob.cpp and move it in a handy<br>
> function/class in libkipiplugins. I have not done this myself yet,<br>
> mainly because I didn't take time to have a look at the other export<br>
> plugins using mpform.{cpp,h} to see what would be the best API for<br>
> this in libkipiplugins. May be it should be just a rewritten version<br>
> of class MPForm taking advantage of QHttpMultiPart.<br>
<br>
</div></div>Shourya,<br>
<br>
Didi you seen Alexander proposal ?<br>
<span class="HOEnZb"><font color="#888888"><br>
Gilles<br>
</font></span></blockquote></div><br></div>