• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

Jignesh Gohel
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic