<div dir="ltr"><div>Thanks everyone. This gives me some good ideas. These are the possible solutions:</div><div><br></div><div>1. Write a python implementation of QgsNetworkContentFetcher or QgsBlockingNetworkRequest. With this I could look at the QGIS version and if it is 3.10 or greater import the core method; otherwise, import the python implementation.</div><div>2. Use the old Boundless implementation if it still works in QGIS 3.</div><div>3. Use QgsFileDownloader and save it as a temporary file before processing.</div><div><br></div><div>Calvin<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 26, 2019 at 2:29 AM Alessandro Pasotti <<a href="mailto:apasotti@gmail.com">apasotti@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 26, 2019 at 8:22 AM Richard Duivenvoorde <<a href="mailto:rdmailings@duif.net" target="_blank">rdmailings@duif.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 26/11/2019 00.06, Nyall Dawson wrote:<br>
<br>
> There's not. But there's the ex-boundless "networkaccessmanager"<br>
> implementation that supports authcfg, which you can find at<br>
> <a href="https://github.com/north-road/qgis-redistricting-plugin/blob/master/redistrict/linz/networkaccessmanager.py" rel="noreferrer" target="_blank">https://github.com/north-road/qgis-redistricting-plugin/blob/master/redistrict/linz/networkaccessmanager.py</a><br>
> (and other projects -- as far as I'm aware there's no real upstream<br>
> for this... Alessandro?).<br>
<br>
I used this Boundless thingie for several plugins now (original source<br>
is now pointing/redirecting to planetlabs [0]).<br></blockquote><div><br></div><div>Yes, that's the "upstream" but I don't know if that one is maintained anymore.</div><div><br></div><div>Btw, there is also a specialized class for sync/async downloads that supports authcfg: <a href="https://qgis.org/api/classQgsFileDownloader.html#details" target="_blank">https://qgis.org/api/classQgsFileDownloader.html#details</a> <br></div><div><br></div><div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I think we already discussed several times that it would be good to<br>
incorporate this into a commons lib for QGIS. But if I'm correct the<br>
actual interface was not exactly what some wanted, and if I recall<br>
correct Nyall tried to pull this into c++ but hit some multithreading<br>
issues.<br>
<br>
But as Nyall says: I think this is a great lib to use in a plugin (also<br>
because it used the QgisNetwork-stuff, so you can receive the signals<br>
from it or log the precise urls, like we do in the QGISnetworklogger<br>
plugin [1]<br>
<br>
Regards,<br>
<br>
Richard Duivenvoorde<br>
<br>
[0]<br>
<a href="https://github.com/planetfederal/lib-qgis-commons/blob/master/qgiscommons2/network/networkaccessmanager.py" rel="noreferrer" target="_blank">https://github.com/planetfederal/lib-qgis-commons/blob/master/qgiscommons2/network/networkaccessmanager.py</a><br>
[1] <a href="https://github.com/rduivenvoorde/qgisnetworklogger" rel="noreferrer" target="_blank">https://github.com/rduivenvoorde/qgisnetworklogger</a><br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr">Alessandro Pasotti<br>w3: <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div></div>
</blockquote></div>