Walter Davis wrote in post #972866:
These files are rather large and a user may want to see the first
page/contents before deciding to download the entire document.
I was wondering if there were any rails/web/js solutions for this or
but I think the issue here is how do you get the preview in the first
place. It sounds like the OP wants to make something like Mac OS's
John, do you have a (hopefully) short list of document types that you
need to handle? Are you storing these files using Paperclip or
similar? I'm thinking that you could use Paperclip's Processors setup
to generate these preview files when they're uploaded, and access them
that way. But you'll need to engineer a mechanism for grabbing the
first page or whatever from each different file-type you plan to
store, along with a fall-back generic curled-page icon for those you
They are a mixture of documents, mainly graphics and pdfs but maybe
others. Its a system i have inherited using rails 1.2.2. Uses file
column to upload the attachments.
I could add a way to get a preview for new files uploaded and store with
the attachment i suppose, images a straight forward to generate
thumbnail. I could run a task to do the same for the existing documents
or do them as and when.
Im looking around the web to see whats out there but it will come down
to the usual, time and money. I just posted to see what others were
doing and was there anything rails specific around.
thanks for your help,