lib/redbooth-ruby/file.rb in redbooth-ruby-0.0.5 vs lib/redbooth-ruby/file.rb in redbooth-ruby-0.1.0
- old
+ new
@@ -22,9 +22,17 @@
:size,
:user_id,
:created_at,
:updated_at
+ # Returns a blop with the file data
+ #
+ # @return [String] the object metadata
+ def download(style='original')
+ request = RedboothRuby.request(:download, nil, "files/#{id}/download/#{style}/#{name}", {}, { session: session })
+ request.body
+ end
+
class << self
# Create operation overwrite to parse file first
def create(attrs)
super(parse_file(attrs))
end