Hello! I’m using Rails 3, Uploadify, to send images to S3.
Right now all the images being uploaded to S3 have the MIME:
I’d like to fix that but I’m getting the following error:
NoMethodError (undefined method `original_filename' for
I think this is because all the tutorials out there aren’t Rails 3
friendly. Anyone have any ideas? Here’s the code:
# Controller def create @photo = @photoalbum.photos.build(:upload_file => params[:photo]) ... end # Model class Photo < ActiveRecord::Base require 'mime/types' ... def upload_file=(data) data.content_type =
self.image = data