Attachment_fu file upload from local files

If you need to batch import files into attachment_fu from a local source then you can doing the following l = Logo.new(:uploaded_data => ActionController::TestUploadedFile.new(“/home/jordan/Documents/test_project/1.jpg”, “image/jpeg”)) You can encapsulate that in a loop and iterate over a list of files if need be (would be assumed for batch import eh.)  Enjoy!

Posted on September 24, 2009 at 8:34 pm by Jordan Carter · Permalink · One Comment
In: Uncategorized · Tagged with: , ,