This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Render thumbnail images of video uploaded at custom path using CarrierWave gem