I want to use jquery-File-upload in Rails 3.2, but I'm a newbie and don't know where to put the necessary js files. The documentation says there are dirs
I know such questions. But I want to know this plugin for downloading files.
thank
If JS is specifically for this application, I would put them in app/assets
app/assets
I tend to have someone else encoded into vendor/assetsand any reusable content that I encoded into lib/assets.. These are things like sliders and what not.
vendor/assets
lib/assets.
jquery-file-upload rails 3.2. app/assets/javascript/vendor.
//= require vendor/jquery-file-upload
application.js
.
Typically, gems / plugins are used to handle file uploads. My favorite, and perhaps the most ubiquitous Paperclip.
Check this app, Upload jQuery file upload files and clips
No need to download files, just add
gem 'jquery-fileupload-rails'
in the gemfile and copy the code shown in
app/views/uploads/index.html.erb
applying any necessary changes to the model name