Skip to content

Instantly share code, notes, and snippets.

@micahbrich
Created February 19, 2009 21:28
Show Gist options
  • Save micahbrich/67130 to your computer and use it in GitHub Desktop.
Save micahbrich/67130 to your computer and use it in GitHub Desktop.
class ImagesController < ApplicationController
session :cookie_only => false, :only => :upload_image_block
def upload_image_block
@image = Image.new(:file => swf_upload_data) # here you can use your favourite plugin to work with attachments
if @image.save
render :partial => 'image', :object => @image
else
render :text => "error"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment