I've got a web-app currently partially working. The user uploads a .txt, .docx or .doc file to the server.
Currently the model handles those files, saves some metadata (the extention and orig filename) then saves the file to the hard drive. Next it converts the doc and docx files to plain text and saves the output to a txt file. My problem is I want to copy the plain text contents of those txt files to the :body field in my database, but by the time those files are written no more changes can be sent to the data base (because all the file handling is done in after_save) Where or how do I sanely get the contents of those TXT files into the database? See model attached: Attachments: http://www.ruby-forum.com/attachment/7574/doc_file.rb -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en-US.