javascript - JQuery with file upload works in development but not production -


i want implement multi-file upload via jquery , have tried jquery file upload , dropzone. both work fine in development fail in production reason.

here jquery code:

$(document).on("ready page:load", function() {  // drop zone if($('#dropzone').length) {     $("#dropzone").dropzone({     maxfilesize: 1.5,     paramname: "picture[image]",     addremovelinks: true,     acceptedfiles: 'image/*,.psd' });}  }); 

here form load images:

<%= form_for(picture.new, html: { multipart: true, class: "dropzone", :id=>"dropzone" }) |f| %>     <%= f.hidden_field(:activity_id, :value => @activity.id) %> <% end %> 

this works fine in development in production, following error:

[error] typeerror: 'undefined' not function (evaluating '$("#dropzone").dropzone

i similar error message jquery file upload.

can this? have precompiled assets.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -