lundi 28 mars 2016

Dropzone.js failed to load resource in safari or mac

I'm using Dropzone in laravel 5.1 but it's working in firefox, chrome in windows. once run in mac it's response error with Failed to load resource: the server responded with a status of 500 (Internal Server Error)

is there any problem with php code ?

I have written following code of javascript:

var dropZone = new Dropzone($(".dropzone").get(0),{
          url: BASE_URL+'user/board/uploadimages',
          uploadMultiple: true,
          parallelUploads: 100,
          maxFiles: 100,
          maxFilesize: 5,
          dictFileTooBig: 'Image is bigger than 5MB',
          addRemoveLinks: false,
          autoProcessQueue: true,
          dictDefaultMessage: "<label class='dropzone-message-container'><i class='fa fa-cloud-upload'></i><div class='clearfix'></div> Drop images to upload</label>",
          acceptedFiles: ".jpeg,.jpg,.png,.gif,.JPEG,.JPG,.PNG,.GIF",
          init: function()
          {
              thisDropzone = this;

            this.on('sending', function(file, xhr, formData){
              hiddenBoardID = $("#dropZone .hiddenBoardID").val();
              formData.append('hiddenBoardID', hiddenBoardID);
            });
            this.on('thumbnail', function(file) {
              console.log(file.width);
                if ( file.width < 1000) {
                  file.rejectDimensions();
                }
                else {
                  file.acceptDimensions();
                }
            });
            this.on("success",function(file, response){


              if(response.success){
                 toastr.success(response.message,"Success");
                 setTimeout(function(){
                     dropZone.removeFile(file);
                     $("#dropZone").modal("hide");
                 },2000);
                $("#imageListing .image-container").empty().html(response.html);
              }else{
                toastr.warning(response.message,"Error");
              }
            });
            this.on("complete", function(file) {
            });
            this.on("queuecomplete", function (file) {
            });

          },
          accept: function(file, done) {
            file.acceptDimensions = done;
            file.rejectDimensions = function() {
              done('The image must be at least 1000 pixels in width');
            };
          },
        }); 

please check following image when I try to upload image in mac.

enter image description here

I have check code in dropzone.js official page as well but hot find out this issue.

Please help for this issue.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire