hi im anas.... im new(means im doing my acadamic project in ror)in ror ......... i have an problem in uploading images(to store in the file system). im using 'fileutils' lib......... plzzz.. any one help me to store images in file system... plzzz... explain in detail with all(model,view,control) for uploading image using fileutils only..... thanq
Visit Indonesia 2008 wrote:
you can read this:
ReinhartLab - Flex, Air, Flash, Ruby on Rails Spots: Create Photo Gallery less than 10 MINUTES
Or you can use AttachmentFu.
Class Attachment
has_attachment
validates_as_attachment
end
From the doc:
Example in controller: def create @attachable_file = AttachmentMetadataModel.new(params[:attachable]) if @attachable_file.save flash[:notice] = 'Attachment was successfully created.' redirect_to attachable_url(@attachable_file) else render :action => :new end end
And you're done.
http://svn.techno-weenie.net/projects/plugins/attachment_fu/README
Anas Ali wrote:
hi im anas.... im new(means im doing my acadamic project in ror)in ror ......... i have an problem in uploading images(to store in the file system). im using 'fileutils' lib......... plzzz.. any one help me to store images in file system... plzzz... explain in detail with all(model,view,control) for uploading image using fileutils only..... thanq
Also Fleximage rails plugin makes this easym as ong as you have RMagick installed.
The code to get it running is pretty dang minimal.
Yeah, I would definitely recommend attachment_fu...
Cheers, Sazima