I was doing it "the hard way" earlier, until I stumbled across this while looking for something else entirely...
Automatically does the multipart stuff, so you can add in extra normal parameters (:user_id => 1, etc).# fixture_file_upload uses /fixtures as its base directorypost :foo_bar, :file => fixture_file_upload('/files/test_file.txt', 'text/plain', :binary)
No comments:
Post a Comment