Welcome Guest, Not a member yet? Register   Sign In
$_FILES Array getting empty when using $this->form_validation->run()
#30

(This post was last modified: 06-12-2019, 04:56 AM by hc-innov.)

remove the die() in your controller and the redirect function.
your javascript code with change
Open your console in your browser
DON'T FORGET to add the class dropzone to your form and remove the class dropzone to your div

Code:
Dropzone.options.propertyForm({
      addRemoveLinks: true,
      paramName: "file",
      maxFiles:11,
      autoProcessQueue: false,
      uploadMultiple: true,
      acceptedFiles: "image/*",
      maxFilesize: 1,
      parallelUploads: 10,

      init: function () {
          var myDropzone = this;
          document.getElementById("submit-all").addEventListener("click", function(e) {
            e.preventDefault();
            e.stopPropagation();
            $(window).scrollTop(0);

            if ( $("#property-form").valid() ) {
              myDropzone.processQueue();

            }

            });
                  // Listen to the sendingmultiple event. In this case, it's the sendingmultiple event instead
           // of the sending event because uploadMultiple is set to true.
           this.on("sendingmultiple", function() {
             console.log('send event');
           });
           this.on("successmultiple", function(files, response) {
             console.log(response);
           });
           this.on("errormultiple", function(files, response) {
             console.log('error');
           });

       }  
   });
Reply


Messages In This Thread
RE: $_FILES Array getting empty when using $this->form_validation->run() - by hc-innov - 06-12-2019, 04:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB