<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QNetworkAccessManager: How to send data&#x2F;file from ftp connection]]></title><description><![CDATA[<p dir="auto">I try to send data/file to current directory( folder that I want) from windows to Linux ?<br />
For this Firsltyi I tried to download some file from Linux.<br />
Here is my code:</p>
<pre><code>QUrl url("ftp://192.168.100.70/root/coming.txt");
  url.setUserName("admin");
  url.setPassword("admin");
  url.setPort(21);
  QNetworkRequest request(url);
  manager=new QNetworkAccessManager(this);
  reply = manager-&gt;get(request);
  connect(reply, SIGNAL(readyRead()), SLOT(downloadReadyRead()));
  connect(reply, SIGNAL(finished()), SLOT(downloadFinished()));
  qDebug()&lt;&lt;reply-&gt;readAll();
</code></pre>
<p dir="auto">and secondly I tried Qt's example download manager and tried:</p>
<pre><code>QNetworkRequest request(url);
  QByteArray applicationUserName = "admin";
  QByteArray applicationUserPassword = "admin";
  request.setRawHeader("Username",applicationUserName);
  request.setRawHeader("Password",applicationUserPassword);
  currentDownload = manager.get(request);
  connect(currentDownload, SIGNAL(downloadProgress(qint64,qint64)),
          SLOT(downloadProgress(qint64,qint64)));
  connect(currentDownload, SIGNAL(finished()),
          SLOT(downloadFinished()));
  connect(currentDownload, SIGNAL(readyRead()),
          SLOT(downloadReadyRead()));
</code></pre>
<p dir="auto">But it returns me:<br />
<strong>Failed: Logging in to 192.168.100.70 failed: authentication required</strong></p>
<p dir="auto">But when I try to connect from fileZilla with this authentication everything is ok.<br />
Do you have any suggestion to me.<br />
<strong>What I really want to do is: I want to upload my files into directories that I want from Windows to Linux by ftp connection (exactly like fileZille, almost same but I want to choose ip and path in my code as a hardcode )</strong></p>
<p dir="auto">I will be plesuare for any help and suggestion.</p>
]]></description><link>https://forum.qt.io/topic/121396/qnetworkaccessmanager-how-to-send-data-file-from-ftp-connection</link><generator>RSS for Node</generator><lastBuildDate>Mon, 10 Aug 2026 05:21:45 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/121396.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 03 Dec 2020 08:59:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QNetworkAccessManager: How to send data&#x2F;file from ftp connection on Thu, 03 Dec 2020 12:32:53 GMT]]></title><description><![CDATA[<p dir="auto">I just setup a local ftp server and tested with the downloadmanager example, setting username and password to the url totally works.<br />
I got</p>
<pre><code>Downloading ftp://admin:admin@127.0.0.1/root/coming.txt...
[###    ]      0.0 bytes/sec
Succeeded.
1/1 files downloaded successfully
</code></pre>
]]></description><link>https://forum.qt.io/post/630501</link><guid isPermaLink="true">https://forum.qt.io/post/630501</guid><dc:creator><![CDATA[Bonnie]]></dc:creator><pubDate>Thu, 03 Dec 2020 12:32:53 GMT</pubDate></item><item><title><![CDATA[Reply to QNetworkAccessManager: How to send data&#x2F;file from ftp connection on Thu, 03 Dec 2020 10:09:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mimcimm">@<bdi>MimCimm</bdi></a><br />
Verify the connection stuff saved/specified in your working FileZilla connector.  For example, it might be using a different port.  Anyway, check that out to make certain your code is trying to do the same.</p>
]]></description><link>https://forum.qt.io/post/630477</link><guid isPermaLink="true">https://forum.qt.io/post/630477</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Thu, 03 Dec 2020 10:09:56 GMT</pubDate></item><item><title><![CDATA[Reply to QNetworkAccessManager: How to send data&#x2F;file from ftp connection on Thu, 03 Dec 2020 09:58:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bonnie">@<bdi>Bonnie</bdi></a>  Unfortunatelly, İt also return</p>
<pre><code>Failed: Logging in to 192.168.100.70 failed: authentication required
</code></pre>
]]></description><link>https://forum.qt.io/post/630472</link><guid isPermaLink="true">https://forum.qt.io/post/630472</guid><dc:creator><![CDATA[MimCimm]]></dc:creator><pubDate>Thu, 03 Dec 2020 09:58:53 GMT</pubDate></item><item><title><![CDATA[Reply to QNetworkAccessManager: How to send data&#x2F;file from ftp connection on Thu, 03 Dec 2020 09:50:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mimcimm">@<bdi>MimCimm</bdi></a><br />
FTP should accept username and password in the url.<br />
But your first code snippet seems not having right design.<br />
So I think you should use the qt example, but set the username and password in the url as in the first method.</p>
]]></description><link>https://forum.qt.io/post/630467</link><guid isPermaLink="true">https://forum.qt.io/post/630467</guid><dc:creator><![CDATA[Bonnie]]></dc:creator><pubDate>Thu, 03 Dec 2020 09:50:07 GMT</pubDate></item><item><title><![CDATA[Reply to QNetworkAccessManager: How to send data&#x2F;file from ftp connection on Thu, 03 Dec 2020 09:35:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bonnie">@<bdi>Bonnie</bdi></a> No I just did that;<br />
request.setRawHeader("Username",applicationUserName);<br />
request.setRawHeader("Password",applicationUserPassword);</p>
]]></description><link>https://forum.qt.io/post/630466</link><guid isPermaLink="true">https://forum.qt.io/post/630466</guid><dc:creator><![CDATA[MimCimm]]></dc:creator><pubDate>Thu, 03 Dec 2020 09:35:34 GMT</pubDate></item><item><title><![CDATA[Reply to QNetworkAccessManager: How to send data&#x2F;file from ftp connection on Thu, 03 Dec 2020 09:06:42 GMT]]></title><description><![CDATA[<p dir="auto">Did you also set the username and password to the url in the second method?</p>
]]></description><link>https://forum.qt.io/post/630458</link><guid isPermaLink="true">https://forum.qt.io/post/630458</guid><dc:creator><![CDATA[Bonnie]]></dc:creator><pubDate>Thu, 03 Dec 2020 09:06:42 GMT</pubDate></item></channel></rss>