Saving a Tropo recording using Ruby

JustinDupree -

Some example code showing how to receive and save an audio file using Ruby:

@bod = request.body.read 
File.open("#{RAILS_ROOT}/public/mcc/#{params[:filename]}.mp3", "w+") { | file| 
    file.write(@bod) 
}
Have more questions? Submit a request

0 Comments

Article is closed for comments.