Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Replacement for QFtp

    General and Desktop
    3
    8
    2487
    Loading More Posts
    • 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
      GwennH last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • G
          GwennH last edited by

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

          1 Reply Last reply Reply Quote 0
          • raven-worx
            raven-worx Moderators last edited by

            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 Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              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 Reply Quote 0
              • G
                GwennH last edited by

                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 Reply Quote 0
                • SGaist
                  SGaist Lifetime Qt Champion last edited by

                  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 Reply Quote 0
                  • G
                    GwennH last edited by

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

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post