snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Feature Request - Integrate document viewer for uploaded files

Open hansenc0705 opened this issue 11 years ago • 8 comments

We are finding that a lot of the documents we upload to assets/licenses are being referenced frequently. Would be nice if they could be opened directly in browser someway.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

hansenc0705 avatar Aug 13 '15 20:08 hansenc0705

What kind of files?

snipe avatar Aug 13 '15 20:08 snipe

My need is for pdfs but I could see others having request for doc/docx/txt/etc.

hansenc0705 avatar Aug 13 '15 20:08 hansenc0705

What kind of document viewer did you have in mind? Does IE not have an integrated PDF viewer?

snipe avatar Aug 13 '15 21:08 snipe

Using chrome right now, the only way to view the pdfs is to download them. maybe its just a way the PDF's are shown in the asset view screen.

hansenc0705 avatar Aug 13 '15 21:08 hansenc0705

So I think we have to let the browser do whatever we can with it (i.e. view the PDF in the browser, versus trying to come up with a special document browser plugin thing), but I think this can be solved pretty easily by providing two icons in the file view area - view, and download.

If the filetype is a PDF, open it inline if you click on the view icon, download if you click on the download icon.

If it is an image of some kind, open it in a lightbox if you click on view, download if it says download.

We should basically just be able to tweak the bit in the controllers to accept a parameter to determine whether we should return Response::download($file); (to download) or something else to display.

snipe avatar Aug 13 '15 23:08 snipe

sounds good to me :)

hansenc0705 avatar Aug 14 '15 00:08 hansenc0705

im thinking of requesting this function too.

but i dont need online viewer. as long i can download back the attachment is fine. mostly pdf and jpg or png type.

imie avatar Sep 22 '15 06:09 imie

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!

stale[bot] avatar Feb 22 '18 01:02 stale[bot]