Closed NotsOverflow closed 5 years ago
I get the following error Uncaught TypeError: Dropzone.initClass is not a function while using dropzonejs in a rails project.
Uncaught TypeError: Dropzone.initClass is not a function
It's a fresh rails installation deployed on heroku like so
I added gem 'dropzonejs-rails' , //= require dropzone and *= require dropzone/dropzone as required by dropzonejs
gem 'dropzonejs-rails'
//= require dropzone
*= require dropzone/dropzone
The controller, the form and js where created as it's required
<%= form_tag '/media_contents', method: :post, class: "dropzone", id: "media-dropzone" do %> <input name="authenticity_token" type="hidden" value="<%= form_authenticity_token %>" /> <div class="fallback"> <%= file_field_tag "media", multiple: true%> </div> <% end %>
$(function() { var mediaDropzone; mediaDropzone = new Dropzone("#media-dropzone"); return mediaDropzone.on("success", function(file, responseText) { var imageUrl; imageUrl = responseText.file_name.url; }); });
Edit: it's converted to
return _inherits(z, Emitter), _createClass(z, null, [{ NaN: "initClass", NaN: function I() {
I dont think that the NaN does any good :/
i need to try using a linux machine cauz it's wierd
it's the asset pipeline
I get the following error
Uncaught TypeError: Dropzone.initClass is not a function
while using dropzonejs in a rails project.It's a fresh rails installation deployed on heroku like so
I added
gem 'dropzonejs-rails'
,//= require dropzone
and*= require dropzone/dropzone
as required by dropzonejsThe controller, the form and js where created as it's required
Edit: it's converted to
I dont think that the NaN does any good :/
i need to try using a linux machine cauz it's wierd