Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Replacement for QFtp
QtWS25 Last Chance

Replacement for QFtp

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 3.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GwennH
    wrote on last edited by
    #1

    Hi,

    It looks like QFtp is said to be buggy, unsupported and discontinued in Qt5.
    My question is simple : what do I use to download binary files from a FTP server with login, using the same asynchronous process as QFtp ?

    Thanks !

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to DevNet,

      AFAIK the official class is "QNetworkAccessManager":http://qt-project.org/doc/qt-4.8/qnetworkaccessmanager.html

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • G Offline
        G Offline
        GwennH
        wrote on last edited by
        #3

        Thanks.
        Does QNAM support binary download and ftp passwords ? I looked into it already but it doesn't look so...

        1 Reply Last reply
        0
        • raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          i think QNAM only can download and upload files by FTP.
          I think you either have to stick with QFtp or use an external ftp library.

          I think uploads with passwords are possible if you already integrate it into the url.
          e.g. username:pw@host.com

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Isn't "this":http://qt-project.org/doc/qt-4.8/qnetworkaccessmanager.html#authenticationRequired what you are looking for for authentication ?

            And for the ftp download, IIRC using a QUrl with ftp://path_to_file/file, should work.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • G Offline
              G Offline
              GwennH
              wrote on last edited by
              #6

              Thanks,

              I'll explain what I'm doing. I'm using a FTP client to replicate (download only) a software tree with ~500 files, over 1GB in size, most of them binary. I have a FTP user and password so that the user can authenticate.

              Can I use QNAM to do that ? Because no mention of "binary" or "ASCII" mode is made anywhere in the documentation and the FTP protocol requires the client to set this mode for each file before starting the download.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                IFAIR, QNAM operates in binary mode, but I can't remember exactly where I saw that...

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  GwennH
                  wrote on last edited by
                  #8

                  Okay, thanks, I'll give it a try.

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved