I would like to iterate through a native folder and execute attachment_fu per each file. Has anyone done this before? Or have any tips or code snippets?
Attachment_fu works well via form - but since I have a sizable amount of files I simply want to batch them in - just as if I were doing it via a form.
I would like to iterate through a native folder and execute
attachment_fu per each file. Has anyone done this before? Or have any
tips or code snippets?
I've uploaded the relevant code that I use at http://pastie.org/236817.
The important parts are UserImage#create_from_file and the FakeUpload
class.
In my case, I just load the appropriate User, then call: