aspose file tools*
The moose likes Ruby and the fly likes Render thumbnail images of video uploaded at custom path using CarrierWave gem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Languages » Ruby
Bookmark "Render thumbnail images of video uploaded at custom path using CarrierWave gem" Watch "Render thumbnail images of video uploaded at custom path using CarrierWave gem" New topic
Author

Render thumbnail images of video uploaded at custom path using CarrierWave gem

Jignesh Gohel
Ranch Hand

Joined: Dec 28, 2004
Posts: 276
Environment : Ruby 1.9.3 / Rails 3.2.1 / Ubuntu 11.10

I am using CarrierWave gem in my application to upload video files. Below is my custom Uploader.

video_file_uploader.rb (uploader)



video.rb (model)


As can be seen above the store_dir points to a path



The directory structure for I have is as follows:



Now I am generating a thumb for the uploaded video at



I need to render this thumb image in my view.For this I used



but it is not getting rendered. In Firebug I can see that the image gets loaded, when I specify the file system's absolute path to the file, while on UI only the thumb image name (alt attribute value) is displayed.

How can I render the images available in a custom directory, like uploads, as shown in the scenario above?

Thanks,
Jignesh

Regards,
Jignesh

The Art Of Life Is To Know When To Be Useless And When To Be Useful - CHUANG TZU
 
jQuery in Action, 2nd edition
 
subject: Render thumbnail images of video uploaded at custom path using CarrierWave gem