Bug 20081 - Enable uploaded pdfs to be viewed inline
Summary: Enable uploaded pdfs to be viewed inline
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-23 19:50 UTC by Nick Clemens
Modified: 2018-12-03 20:05 UTC (History)
2 users (show)

See Also:
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 (2.65 KB, patch)
2018-01-23 20:25 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 20081: Set inline headers for uploaded pdfs (2.71 KB, patch)
2018-01-24 14:11 UTC, Claire Gravely
Details | Diff | Splinter Review
Bug 20081: Set inline headers for uploaded pdfs (2.77 KB, patch)
2018-03-25 19:17 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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