pandurang90/cloudconvert — pull request #8 by olibob (2014-05-24 09:06:25+00:00)
Title: Upload file

Hi,

This is **based on my previous pull request**. So if you decide to merge, you might ignore the previous one and use this one.

I added the possibility to simply upload a local file.

Example:

```
#!/usr/bin/env ruby

require 'cloudconvert'

Cloudconvert.configure do |config|
# config.api_key = 'your api key'
end

conv = Cloudconvert::Conversion.new('md', 'pdf')
conv.newProcess

conversion_options = {
input: 'upload',
file: Faraday::UploadIO.new('/Users/robby57/file.md', 'text/plain'),
filename: 'file.md',
email: '1',
output: 'dropbox'
}
conv.conversion_payload(conversion_options)
conv.uploadFile

step = conv.status['step']

while !(step =~ /error|finished/)
step = conv.status['step']
puts step
sleep 2
end

puts "File conerted successfully, url:'http:#{conv.status['output']['url']}'"
```