Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-48206

Content-DIsposition not available in QWebEngineDownloadItem

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.7.0
    • 5.5.0
    • WebEngine
    • None

    Description

      In QWebEngineDownloadItem we can access the URL that is triggerring the download but not any headers from the response. In particular, the Content-Disposition header, which can help to choose a filename for the download.

      This makes implementing file downloads difficult. Either one has to generate some kind of filename from the URL, or make a separate HEAD request to the server to fetch the Content-Disposition header. And since there is no way to make requests via QWebEngine, it has to be done via QNetworkAccessManager, which means it wont work for downloads that are protected by authentication.

      I dont know if the chromium API exposes endpoints to do this, but I will note that chromium itself uses the value from Content-Disposition to generate a filename for downloads.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt_webengine_team Qt WebEngine Team
            kovid Kovid Goyal
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes