This is a example for https://github.com/huobazi/qiniu_direct_uploader
Please see the files
config/initializers/qiniu.rb.example
app/views/items/index.html.erb
app/assets/javascripts/items.js.coffee
app/controllers/items_controller.rb
- Clone the repo to your localhost
- Rename the config/initializers/qiniu.rb.example to config/initializers/qiniu.rb
- Setup your Qiniu KEY to the config/initializers/qiniu.rb
- Bundle install && Run
- Upload a image
- See the javascript console
see also:
- http://docs.qiniu.com/api/v6/put.html#upload-without-callback
- http://docs.qiniu.com/api/v6/put.html#upload-api
- http://docs.qiniu.com/api/v6/put.html#uploadToken-returnBody
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request