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

Content-DIsposition not available in QWebEngineDownloadItem

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.5.0
    • Fix Version/s: 5.7.0
    • Component/s: WebEngine
    • Labels:
      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

            Assignee:
            qt_webengine_team Qt WebEngine Team
            Reporter:
            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