Use any where and upload file with ajax. No need of any form.
Add this line to your application's Gemfile:
gem 'discrete_upload_to'
And then execute:
$ bundle
Or install it yourself as:
$ gem install discrete_upload_to
-
function discrete_upload_success(url){
}
function discrete_upload_failure(){
}
-
<%= discrete_upload_tag :file, url, class%>
- Fork it ( https://github.com/[my-github-username]/discrete_upload_to/fork )
- 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 a new Pull Request