Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-36783

Artifact download links rely on mime type to determine download vs. view

    • pannonian

      Fix download to actually download, and clicking on artifact name to show OR download.

      In scope:

      • Clicking on download should always result in a download
      • Clicking on artifact name should open the artifact in a new tab (as now) IFF the browser knows how to render (ie the current behavior for download link should be transferred to name)

      Out of scope:

      • Moon landing.

      HTML5 download attribute (as mentioned below) is probably fine to use.

      Reproduction notes:

      Procedure

      1. Browse to a build that has produced artifacts (test.html, test.blob).
      2. Click on test.html (it will be viewed)
      3. Click on test.blob (it will be downloaded)

      Expected

      Clicking on the artifact "download" link should always download the artifact. A download (and filename) should be forced using Content-Disposition (from the server) or a HTML5 download=FILENAME attribute (client).

      Clicking on the artifact name should do what the current download icon does - ie download or show (if the browser knows how to render the content type).

      How this is implemented depends if server side header or html5 download is used.

      Actual

      Some mime-types are downloaded, some are viewed

      *.html are opened for view, *.unknown are downloaded.

          [JENKINS-36783] Artifact download links rely on mime type to determine download vs. view

          Ben Walding created issue -
          James Dumay made changes -
          Epic Link New: JENKINS-35750 [ 171713 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 173520 ] New: JNJira + In-Review [ 185172 ]
          James Dumay made changes -
          Issue Type Original: Improvement [ 4 ] New: Bug [ 1 ]
          James Dumay made changes -
          Sprint New: 1.0-beta-2 [ 96 ]
          James Dumay made changes -
          Rank New: Ranked higher
          James Dumay made changes -
          Sprint Original: 1.0-beta-1 [ 96 ] New: 1.0-beta-2 [ 101 ]
          James Dumay made changes -
          Rank New: Ranked lower
          Michael Neale made changes -
          Description Original: h3. Procedure
          # Browse to a build that has produced artifacts (test.html, test.blob).
          # Click on test.html (it will be viewed)
          # Click on test.blob (it will be downloaded)

          h3. Expected
          Clicking on the artifact "download" link should always download the artifact. There should *probably* be an alternate "view" link. This would be consistent with the log screen which has download and view links. A download (and filename) should be forced using Content-Disposition.

          h3. Actual

          Some mime-types are downloaded, some are viewed

          *.html are opened for view, *.unknown are downloaded.
          New: h3. Procedure
          # Browse to a build that has produced artifacts (test.html, test.blob).
          # Click on test.html (it will be viewed)
          # Click on test.blob (it will be downloaded)

          h3. Expected
          Clicking on the artifact "download" link should always download the artifact. A download (and filename) should be forced using Content-Disposition (from the server) or a HTML5 download=FILENAME attribute (client).

          Clicking on the artifact name should do what the current download icon does - ie download or show (if the browser knows how to render the content type).

          How this is implemented depends if server side header or html5 download is used.

          h3. Actual

          Some mime-types are downloaded, some are viewed

          *.html are opened for view, *.unknown are downloaded.
          Michael Neale made changes -
          Description Original: h3. Procedure
          # Browse to a build that has produced artifacts (test.html, test.blob).
          # Click on test.html (it will be viewed)
          # Click on test.blob (it will be downloaded)

          h3. Expected
          Clicking on the artifact "download" link should always download the artifact. A download (and filename) should be forced using Content-Disposition (from the server) or a HTML5 download=FILENAME attribute (client).

          Clicking on the artifact name should do what the current download icon does - ie download or show (if the browser knows how to render the content type).

          How this is implemented depends if server side header or html5 download is used.

          h3. Actual

          Some mime-types are downloaded, some are viewed

          *.html are opened for view, *.unknown are downloaded.
          New: Fix download to actually download, and clicking on artifact name to show OR download.

          In scope:
          * Clicking on download should always result in a download
          * Clicking on artifact name should open the artifact in a new tab (as now) IFF the browser knows how to render (ie the current behavior for download link should be transferred to name)


          Out of scope:
          * Moon landing.

          HTML5 download attribute (as mentioned below) is probably fine to use.


          Reproduction notes:

          h3. Procedure
          # Browse to a build that has produced artifacts (test.html, test.blob).
          # Click on test.html (it will be viewed)
          # Click on test.blob (it will be downloaded)

          h3. Expected
          Clicking on the artifact "download" link should always download the artifact. A download (and filename) should be forced using Content-Disposition (from the server) or a HTML5 download=FILENAME attribute (client).

          Clicking on the artifact name should do what the current download icon does - ie download or show (if the browser knows how to render the content type).

          How this is implemented depends if server side header or html5 download is used.

          h3. Actual

          Some mime-types are downloaded, some are viewed

          *.html are opened for view, *.unknown are downloaded.
          James Dumay made changes -
          Rank New: Ranked higher

            tscherler Thorsten Scherler
            bwalding Ben Walding
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: