codefirst/AsakusaSatellite — pull request #129 by shimomura1004 (2013-08-25 05:35:43+00:00)
Title: support file attachment with API refs #122

tested with the following script

```ruby
# ./uploader.rb http://hoge.com/api/v1/message.json hoge.jpg

require 'rest-client'

url = ARGV.shift
files = ARGV

data = {}
data["api_key"] = "(api key)"
data["room_id"] = "(room id)"
data["message"] = "test message"
files.each do |file|
data["files[#{file}]"] = File.new(file, 'rb')
end

RestClient.post(url, data)
```