problem in download a direct link using QNetworkAcessManager
Unsolved
General and Desktop
-
I'm using QNetworkAcessManager to download a pdf file from a direct link this the link here
but it download nothing and the QByteArray size is 0 I try it on another link of mp3 files and many others and it works fine but I want to know why this link can't be downloaded I try using Curl to download it and the same problem
so I try to do it in java but it give me an errorException in thread "main" java.net.MalformedURLException: no protocol: www.proz.com/ht/profile_resources/022198_r4551c465d7a53.doc
when I search on this error the solve of it was to encode it so I back again and do it in Qt and encode the URL using this
reply = manager->get(QNetworkRequest(QUrl(QUrl(Link).toEncoded()))); connect(reply, SIGNAL(readyRead()), this, SLOT(CollectFile())); connect(reply, SIGNAL(finished()), this, SLOT(DocDownloaded()));
but the same problem for both java and Qt so what casue this problem and why it's not download
Thank in advance -
Hi,
The java error seems pretty clear: you didn't set the protocol e.g. http or ftp