I can't upload files > 1MB using dropzonejs, ruby-on-rails and puma -


i trying make web application people can upload files, stored on hard drive then. using dropzonejs handle file uploads , ruby-on-rails create web application. problem whenever try upload file bigger 1 mb hangs on 99.9999% , never gets uploaded fully.

my form is:

<%= form_tag '/upload', html: {multipart: true}, class: "dropzone" , id: "media-dropzone" %>      <div class="fallback">         <%= file_field_tag "files", multiple: true%>      </div> <% end %> 

the associated javascript is:

<script src="/assets/dropzone.js" type="text/javascript">     var token=$('meta[name="csrf-token"]').attr('content');     dropzone.autodiscover = false;     var dz = new dropzone("div#mydropzone",{         url: "/upload_file/upload",         autoprocessqueue:false,         uploadmultiple:true,         addremovelinks:true,         maxfiles:2,         paralleluploads:2,         acceptedfiles: text/xml,         params:{             'authenticity_token': token         }        });      $('form').submit(function(e) {         if(dz.getqueuedfiles().length > 0) {             e.preventdefault();             dz.processqueue();         }     }); </script> 

my rails server runs puma 3.9.1

edit

a picture of hanging upload

thanks @pavel, remembered install nginx, , fixed problem


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -