javascript - dropzone doesnt upload some pictures (internal server error 500) -


i use dropzone file(images) upload. when upload on local computer, files upload successfully. when upload files on web host, dropzone gives iternal server error on pictures(not all). experiment, uploaded 1 picture several times. , dropzone gives error, , sometime doesnt(on same picture). not blame picture's size (i tried pictures 4-5 kb). here's code

 dropzone.autodiscover = false; var mydropzone = new dropzone("div#dropzone",  { url: "{{action('admintourscontroller@storeimage')}}",     addremovelinks : true } ); mydropzone.on('sending', function(file, xhr, formdata){     formdata.append("_token", $('meta[name="csrf_token"]').attr('content')); // laravel expect token post value named _token default  }); var = 1; mydropzone.on('complete', function(a, b, c){     var src = json.parse(a.xhr.responsetext).uploaded_path;     $("<input type='hidden' name='gallery-img-" + i++ + "' value='"+ src + "'/>").appendto('.tour-add-form');     addremovelinks : true; }); 

the problem because of permissions. solved setting permissions 775 uploads directory


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -