Bug 20081

Summary: Enable uploaded pdfs to be viewed inline
Product: Koha Reporter: Nick Clemens <nick>
Component: ToolsAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: library, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14282
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14294
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 20081: Set inline headers for uploaded pdfs
Bug 20081: Set inline headers for uploaded pdfs
Bug 20081: Set inline headers for uploaded pdfs

Description Nick Clemens 2018-01-23 19:50:25 UTC
When attaching files to bib records using the upload.pl plugin it would be nice to display viewable files in the browser instead of forcing download.
Comment 1 Nick Clemens 2018-01-23 20:25:07 UTC
Created attachment 70864 [details] [review]
Bug 20081: Set inline headers for uploaded pdfs

To test:
1 - Edit a framework and add the 'upload/pl' plugin to the 856 field
2 - Attach a pdf to one record
3 - Attach a different type of file to another
(To attach, edit a record in the framework edited above and find the
 helper by the 856 field)
4 - Click the links on the record
5 - Verify the pdf opens inline
6 - Verify the other file does not
7 - prove t/db_dependent/Upload.t
Comment 2 Claire Gravely 2018-01-24 14:11:46 UTC
Created attachment 70878 [details] [review]
Bug 20081: Set inline headers for uploaded pdfs

To test:
1 - Edit a framework and add the 'upload/pl' plugin to the 856 field
2 - Attach a pdf to one record
3 - Attach a different type of file to another
(To attach, edit a record in the framework edited above and find the
 helper by the 856 field)
4 - Click the links on the record
5 - Verify the pdf opens inline
6 - Verify the other file does not
7 - prove t/db_dependent/Upload.t

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 3 Marcel de Rooy 2018-01-24 15:06:37 UTC
The idea on 14282 was to do this somewhat less hardcoded and more configurable..
Comment 4 Nick Clemens 2018-01-24 15:33:09 UTC
Hi Marcel,

I saw that bug but wasn't sure what you envisioned, what would you suggest? 

My first thought was a syspref specifying the extensions that should be inline.

-Nick
Comment 5 Katrin Fischer 2018-03-25 19:17:22 UTC
Created attachment 73257 [details] [review]
Bug 20081: Set inline headers for uploaded pdfs

To test:
1 - Edit a framework and add the 'upload/pl' plugin to the 856 field
2 - Attach a pdf to one record
3 - Attach a different type of file to another
(To attach, edit a record in the framework edited above and find the
 helper by the 856 field)
4 - Click the links on the record
5 - Verify the pdf opens inline
6 - Verify the other file does not
7 - prove t/db_dependent/Upload.t

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Jonathan Druart 2018-03-26 20:37:43 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 7 Nick Clemens 2018-04-23 22:48:30 UTC
Enhancement, not backported for stable