Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-54944

Download link for externally linked attachments should not append "&download=true" to linked URL in file preview

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 6.0.7, 6.6.0, 6.13.0
    • Editor - Attachment
    • None

    Description

      Summary

      When using the Download link in the file preview, "&download=true" is appended to the filename. This is fine for locally attached files it's treated as a query string parameter, but this should not be appended to externally file URLs, and it makes the download function not work because the file doesn't exist with this filename.

      Example - with an inserted image from the web with the following URL:

      https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg

      The download link in the file preview will link to:

      https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg&download=true

      Which will result in an error. The "&download=true" should not be appended for externally referenced images.

      See attached screen recording for demo.

      Environment

      • This is reproduced in Confluence 6.6

      Steps to Reproduce

      To create the page with the image

      1. Edit a Confluence page
      2. Click to insert an image, and choose "from the web"
        • Insert > Files and images > Images from the web
      3. Use any image URL, such as:
      4. Click Preview and Insert and verify the image is visible on the page.
      5. Save the page

      Then to reproduce the issue

      1. Click on the image to bring up the File Preview
      2. Hover over the download link (down-arrow icon) and notice the "&download=true" is appended to the filename.
      3. Click the download link.
        • At this point, depending on the browser you may get an error now, or you may get a download dialog box to select the filename and path. From here, you will get an error with the download.

      Expected Results

      The download function for externally linked images should not add this "&download=true" parameter and should download the image correctly.

      Actual Results

      The download function doesn't work, as the filename is incorrect.

      Workaround

      As a workaround, you can right-click the download link and select to copy the URL or open link in new tab. From there, the URL can be edited to remove the "&download=true" from the end of the filename to access the file and download it from there. (see my attached screen recording).

      Attachments

        Activity

          People

            Unassigned Unassigned
            ddegeatano Dave Degeatano
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: