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

Attached files appear in list, but throw a "404 Not Found" when attempting to view them

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Jenkins: v1.540
      JUnit-Attachments: v1.3

      The files are displayed correctly, and are available on the server (I can copy them to another machine and view them). However, when clicking on the file, the light box displays the following error:

      This image failed to load.

      If I attempt to open the image in a new tab/window, I get a "404 Not Found" exception.

      I've checked the permissions throughout the Jenkins install and everything seems to be in order (however, this an instance that doesn't use any kind of authentication; everyone is the anonymous user with full permissions).

      Clicking the "attachments" link to the left yields even more interesting results:

      http://junit/<namespace>/<test class name>/attachments

      It appears that the link is rather incomplete, and doesn't reference the actual Jenkins instance I'm using.

      If I've missed anything, or you need additional information, please let me know!

        Attachments

          Issue Links

            Activity

            Hide
            jrogers Jonathan Rogers added a comment -

            I just encountered very similar behavior. I determined that my problem was that my attachment file names contained percent-encoded slashes (%2F) and Jenkins was leaving them unmodified when generating links. The files existed but the links to them were wrong. My attachment file names had been deliberately percent-encoded since they had been generated from URL paths so I worked around the problem by simply using the last path segment instead of encoding slashes. I suspect that generating file names from URLs is a common need so Jenkins should deal with URL encoding in file names.

            Show
            jrogers Jonathan Rogers added a comment - I just encountered very similar behavior. I determined that my problem was that my attachment file names contained percent-encoded slashes (%2F) and Jenkins was leaving them unmodified when generating links. The files existed but the links to them were wrong. My attachment file names had been deliberately percent-encoded since they had been generated from URL paths so I worked around the problem by simply using the last path segment instead of encoding slashes. I suspect that generating file names from URLs is a common need so Jenkins should deal with URL encoding in file names.
            Hide
            jglick Jesse Glick added a comment -

            Sounds like JENKINS-37026.

            Show
            jglick Jesse Glick added a comment - Sounds like  JENKINS-37026 .
            Hide
            dfhinton Daniel Hinton added a comment -

            I think you mean JENKINS-37026 sounds like this issue (that one is only a year old, and this one is going on 5 years) 

            Show
            dfhinton Daniel Hinton added a comment - I think you mean JENKINS-37026 sounds like this issue (that one is only a year old, and this one is going on 5 years) 

              People

              Assignee:
              huybrechts huybrechts
              Reporter:
              dfhinton Daniel Hinton
              Votes:
              4 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: