$_FILES Array getting empty when using $this->form_validation->run() |
Buddy I need only data being uploaded on submit click, we already set autoProcessQueue = false is it fine ?
A complete exemple:
controller (I just print_r or echo variables for the javscript console) PHP Code: <?php The view upload PHP Code: <html> the good javascript (newjavascript): Code: Dropzone.options.propertyForm = { the response in my console: send event newjavascript.js:22:15 Array ( [file] => Array ( [name] => Array ( [0] => mcd.png ) [type] => Array ( [0] => image/png ) [tmp_name] => Array ( [0] => /tmp/php1B29UX ) [error] => Array ( [0] => 0 ) [size] => Array ( [0] => 12549 ) ) ) evrything works
(06-12-2019, 06:20 AM)hc-innov Wrote: A complete exemple: Buddy u there ?
yes, follow my example and understand it.
Copy the code in your editor. I explain: I don't use jquery, it's not important and not necessary. If you want to pass all input , you must add class dropzone to your form. After, you can call Dropzone.options.propertyForm=... (propertyForm is the camelized ID of the form element) options uploadMultiple: true and parallelUploads are important. DropzoneJS send a XHR request(Ajax) to the url (attribute action). It send the $_FILES and $_POST. because it's an ajax call, don't use redirect in your PHP code, use it in your javascript.
|
Welcome Guest, Not a member yet? Register Sign In |