Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Jira Attachment Pdf Download Open In Browser

1 view
Skip to first unread message

Wynell Patts

unread,
Dec 8, 2023, 9:27:08 AM12/8/23
to
If I understand your concerns here, you have found that attachments in a Jira issue will open in a preview window, but that links to these attachments found in descriptions or comments always prompt to download instead of preview. In my testing of this, my attachments never open in Google PDF Viewer, but then again, I don't have that browser plugin/app installed to my machine. So perhaps this plugin is a factor in the behavior you have described here.

Even without that plugin, when when clicking on some files in the attachment section, Jira will use a preview window to display these. This has a black bar on the top with the filename, download button, and close X, like so:

Jira Attachment Pdf Download Open In Browser
Download File https://8diaprinzpistpe.blogspot.com/?download=2wJaCG



But I should note that this particular behavior only works for some mime filetypes. For example, most images such as png, jpg, gif, and pdfs will have the ability to use this preview window when clicked on from the attachment section on the issue. But other filetypes, such as txt, csv do not utilize this preview at all. For those files, they are prompted to be downloaded outright when clicking on them. I believe that this comes down to what is easier to display within the browser itself and what usually is expected to be opened/loaded with a 3rd party program (I'm thinking spreadsheets like xls files).

As for the difference between links and the attachment section, I believe this is by design. When reading a description or comment, it is possible that you could have inserted attached images as a thumbnail directly (pdf does not have this embed ability, but other image files do). But the use of a link here seems to be more in line with a desire to have the other users viewing this issue to download that file as needed.

Now, on a new browser tab, return to the Xporter for Jira administration section Add-ons page of the Jira Administration. On the Enable Xporter for Jira panel on Single Issue View, tick On and click Save. Return to the previous tab, click Back to Issue, and now the Xporter for Jira panel will be displayed on the right sidebar of the issue. This time, add two attachments of your choosing to the issue. Then, select the Issue Details with Cover Page template with the PDF output and click Export. Open the generated file with a PDF reader and you'll see your generated document along with the attached issue files.

Now, open a new browser window in Incognito mode (press Ctrl + Shift + n on your keyboard), paste the same link and click Enter. An error page will be displayed, and by expanding the Request assistance option, you will see Invalid permissions under Cause.

Export the Issue Details with Cover Page template with the Output format as Docx and the Break pages selector with its set default option (Issues). After downloading, open it and you'll see that all issues are printed, each starting after a page break.

Also, if you open two browser windows on the Issue Navigator and try to bulk export on the second window while the same action is being performed on the first window, an Error! The number of export requests running has exceeded its limit. will be displayed in the second window. If you return to the tab with Xporter for Jira administration section Add-ons page of the Jira Administration, and on the Maximum number of simultaneous requests replace the default value with 10, click Save, and repeat, no error message will be displayed this time.



Example"expand":"renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations","id":"10002","self":" ","key":"EX-1","fields":"watcher":"self":" -1/watchers","isWatching":false,"watchCount":1,"watchers":["self":" =fred","name":"fred","displayName":"Fred F. User","active":false],"attachment":["self":" ","filename":"picture.jpg","author":"self":" =fred","name":"fred","avatarUrls":"48x48":" =large&ownerId=fred","24x24":" =small&ownerId=fred","16x16":" =xsmall&ownerId=fred","32x32":" =medium&ownerId=fred","displayName":"Fred F. User","active":false,"created":"2017-12-07T09:23:19.542+0000","size":23123,"mimeType":"image/jpeg","content":" ","thumbnail":" "],"sub-tasks":["id":"10000","type":"id":"10000","name":"","inward":"Parent","outward":"Sub-task","outwardIssue":"id":"10003","key":"EX-2","self":" -2","fields":"status":"iconUrl":" ","name":"Open"],"description":"example bug report","project":"self":" ","id":"10000","key":"EX","name":"Example","avatarUrls":"48x48":" =large&pid=10000","24x24":" =small&pid=10000","16x16":" =xsmall&pid=10000","32x32":" =medium&pid=10000","projectCategory":"self":" ","id":"10000","name":"FIRST","description":"First Project Category","comment":["self":" ","id":"10000","author":"self":" =fred","name":"fred","displayName":"Fred F. User","active":false,"body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.","updateAuthor":"self":" =fred","name":"fred","displayName":"Fred F. User","active":false,"created":"2017-12-07T09:23:19.175+0000","updated":"2017-12-07T09:23:19.175+0000","visibility":"type":"role","value":"Administrators"],"issuelinks":["id":"10001","type":"id":"10000","name":"Dependent","inward":"depends on","outward":"is depended by","outwardIssue":"id":"10004L","key":"PRJ-2","self":" -2","fields":"status":"iconUrl":" ","name":"Open","id":"10002","type":"id":"10000","name":"Dependent","inward":"depends on","outward":"is depended by","inwardIssue":"id":"10004","key":"PRJ-3","self":" -3","fields":"status":"iconUrl":" ","name":"Open"],"worklog":["self":" ","author":"self":" =fred","name":"fred","displayName":"Fred F. User","active":false,"updateAuthor":"self":" =fred","name":"fred","displayName":"Fred F. User","active":false,"comment":"I did some work here.","updated":"2017-12-07T09:23:19.553+0000","visibility":"type":"group","value":"jira-developers","started":"2017-12-07T09:23:19.553+0000","timeSpent":"3h 20m","timeSpentSeconds":12000,"id":"100028","issueId":"10002"],"updated":1,"timetracking":"originalEstimate":"10m","remainingEstimate":"3m","timeSpent":"6m","originalEstimateSeconds":600,"remainingEstimateSeconds":200,"timeSpentSeconds":400,"names":"watcher":"watcher","attachment":"attachment","sub-tasks":"sub-tasks","description":"description","project":"project","comment":"comment","issuelinks":"issuelinks","worklog":"worklog","updated":"updated","timetracking":"timetracking","schema":

This really useful add-on allows me to edit any Confluence attachment, such as design drawings, PDF documents and even ZIP files. One major advantage of GoEdit is that I can use my favorite browser (e.g. Safari or Chrome, in addition to Firefox and Internet Explorer).

After installing GoEdit, there is no need to configure the add-on itself. The only thing you need to do before editing attachments for the first time is to allow the GoEdit Java plug-in application to run in your browser.

When the download attribute applies, it is treated the same way as a Content-Disposition: attachment header sent by the server. As I noted before, per bug 453455, we think the user's preferences should win over what the server says - irrespective of whether the user has indicated they want the PDFs to open in an external app (Acrobat or w/e), automatically save to disk, or opening in Firefox. For the latter case, we open the file direct from the server, rather than first saving to disk, which helps preserve the URL of the PDF (though I guess that's less useful for blob URLs, those are probably a minority), cf bug 1689666. Users can still save the PDF to disk from within the PDF viewer UI, if they want to do that.

Before 98, by default for this PDF the user would get a dialog asking if they wanted to open in firefox, open with another app, or save. If they pick "open in firefox" (the default!) or "open with [acrobat/edge/whatever]" and were on Windows or Linux, the file would be saved in the temp directory, and deleted once the browser and/or private browsing session in the browser was ended. As a result, your goal of ensuring permanent storage would still not be accomplished. On macOS, lost in a pile of other PDFs in the default downloads folder, I am also not convinced users would be able to find it back when needed...

When the download attribute applies, it is treated the same way as a Content-Disposition: attachment header sent by the server. As I noted before, per bug 453455, we think the user's preferences should win over what the server says - irrespective of whether the user has indicated they want the PDFs to open in an external app (Acrobat or w/e), automatically save to disk, or opening in Firefox.

But what with applcations that hava state?
When user click link to download PDF, he will lose state of application. In this situation user think that it is problem with application not with settings of him FIREFOX browser. I think that default option for "Content-type: attachement" should be always ask. And then user can decide if he want download or only opne in browser. The other problem is that header "Content-type: attachement; filename='file.pdf'" is ignored so we can not decide which name for file will be present.

What the default is is orthogonal - no other browser I'm aware of defaults to "always ask", they all save to disk. (Safari has a per-site permission for downloads generally but I'm pretty sure everyone agrees that a modal prompt that offers no details at all about the download and just asks whether downloads in general should be allowed for that site is not a good user experience - plus after you allow them, any subsequent downloads don't ask you anything). This bug is purely about whether we end up replacing the tab content.

I tried to reproduce it and I found where is problem. It is problem with domain. If PDF is serving from other domain everything is ok.
But when PDF is localized in same domain as current page in browser then link will open PDF in same Tab ang ignoring target="blank" attribute.
eebf2c3492
0 new messages