Open raoaamirmuhammad opened 4 years ago
Have you also required jquery above jquery-fileupload in application.js?
Yes I required the following jquery before jquery-fileupload
//= require jquery3
//= require jquery-ui
I also required jquery-fileupload but didn't work
The error message shows jquery-1.12.4.js
, but you said you require jquery3
which is jQuery 4.3.1 in the latest version of jquery-rails, so I think you are loading another copy of jQuery with some other vendored script and that is causing the problem.
Check your assets in chrome devtools, to see were the duplicate jQuery is comming from and get rid of it.
I have the following jquery gems in my Gemfile
gem 'jquery-rails' gem "jquery-ui-rails" gem 'jquery-fileupload-rails'
I added in my application.js
//= require jquery-fileupload/basic
Form is
<%= form_with model: @xyz, html: { multipart: true, id: "fileupload" } do |f| %> <% end %>
and the script is
<script> $(function() { $('#fileupload').fileupload(); }); </script>
I got error
I am using activestorage, not carrierwave Can anyone help me here