Hi, With images we can give the user the thumbnail to see if thats the image they are interested in. Is there anything similar around where you could give the user a preview of a file within the web page? Rails or web specific? Ive searched around but cant really find anything, JB -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
John Butler wrote in post #972859:> Hi, > > With images we can give the user the thumbnail to see if thats the image > they are interested in. Is there anything similar around where you > could give the user a preview of a file within the web page? Rails or > web specific?Uh, what? Please explain your use case a bit more clearly. In any case, this is almost certainly a JavaScript issue and will have nothing to do with Rails.> > Ive searched around but cant really find anything, > > JBBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
sorry for the poor explanation. If you have a webpage with a list of documents, when the user clicks a document then it will show them the first page of this document in a pop up window or in some type of window within the web page via ajax or something. 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 something similar... JB -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Please quote when replying. John Butler wrote in post #972862:> sorry for the poor explanation. > > If you have a webpage with a list of documents, when the user clicks a > document then it will show them the first page of this document in a pop > up window or in some type of window within the web page via ajax or > something.What kind of documents?> > 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 > something similar...JavaScript solutions exist. Try a Web search.> > JBBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Jan 6, 2011, at 12:02 PM, Marnen Laibow-Koser wrote:>> 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 >> something similar... > > JavaScript solutions exist. Try a Web search.JavaScript can *show* the preview in a nice popup or overlay, true, 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 QuickLook here... 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 can''t untwist. Walter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Walter Davis wrote in post #972866:> On Jan 6, 2011, at 12:02 PM, Marnen Laibow-Koser wrote: > >>> 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 >>> something similar... >> >> JavaScript solutions exist. Try a Web search. > > > JavaScript can *show* the preview in a nice popup or overlay, true, > 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 > QuickLook here... > > 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 > can''t untwist. > > WalterThey 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, JB -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Walter Davis wrote in post #972866:> On Jan 6, 2011, at 12:02 PM, Marnen Laibow-Koser wrote: > >>> 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 >>> something similar... >> >> JavaScript solutions exist. Try a Web search. > > > JavaScript can *show* the preview in a nice popup or overlay, true, > but I think the issue here is how do you get the preview in the first > place.[...] My understanding is that the various JS preview libraries handle the preview image generation within the library. I might be wrong, though; I''ve never done this. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Jan 6, 2011, at 12:26 PM, Marnen Laibow-Koser wrote:>> JavaScript can *show* the preview in a nice popup or overlay, true, >> but I think the issue here is how do you get the preview in the first >> place. > [...] > > My understanding is that the various JS preview libraries handle the > preview image generation within the library. I might be wrong, > though; > I''ve never done this.JavaScript can only request an image and show it (often using some groovy effect to make it shinier); it can''t process the image data and provide a thumbnail or something like that. To get that, you''d need something server-side to do the heavy lifting like Rmagick or some other image processing library, and you''d need a controller to interpret the image request, decide if the file already had been processed, do the processing and cache it if not, and then serve it. Quite a bit out of the usual realm for JS, right in the zone for Rails and one of its many add-ons. If I were building this from scratch, I''d be looking at Paperclip, because that has all the hooks for making thumbnails and resized images already baked in, plus a very nice system for extending the thumbnail process to other types of files. I''ve built a system that scrapes all the text out of a PDF and saves it in a column in the database so I can do "full text" search within PDF attachments. Considering I built that as part of my very first paying Rails gig, I happen to think that Paperclip is *very* accessible that way... Walter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.