Skip to content

Instantly share code, notes, and snippets.

@jcoyne
Created July 23, 2013 13:56
Show Gist options
  • Save jcoyne/6062523 to your computer and use it in GitHub Desktop.
Save jcoyne/6062523 to your computer and use it in GitHub Desktop.
# This will produce two derivative datastreams 'avatar_medium' and 'avatar_thumb'. The original will be just 'avatar'
# has_file_datastream 'avatar', :styles => { :medium => "300x300>", :thumb => "100x100>" }, :default_url => "/images/:style/missing.png"
#
# This will call a processor Transcoding::Ocr and store the text in 'document_text'
# has_file_datastream 'document', :styles => { :text => { :quality => :better } },
# :processors => [:ocr]
#
# process_in_background :avatar, queue: 'avatar'
# process_in_background :document, queue: 'extract_text'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment