javascript - How to return the file name from the Upload_Handler class in jQuery File Uploader -
I'm trying to access the file name that is being sent to the index file of the jQuery file uploader.
I have added a function to try to return that information back to the index.php file. I added the function right below the handle_file_upload function in the UploadHandler class.
public function get_filename () {$ this-> Handle_file_upload (); }
I was trying to use in the index.php file
$ upload_handler = new upload handler ($ option); $ Name = $ upload_handler- & gt; Gate_filname ();
This will not return as expected file name. I have tried to retrieve the file names from the $ _POST array, but not really able to see what the array is or how to display the post array.
Update:
I thought that if I do this:
$ fn = $ upload_handler -> Posts ($ files);
This gives all the necessary information in an array.
This array gives down
array ('files' => array (0 = & gt; stdClass :: __set_state (array (' name '=' & Gt; Seven-2 (1) .xls', 'size' =>, 'type' = & gt; 'application / vnd.ms-excel', 'error' = & gt; File upload Canceled ',' deleteUrl '= & gt;' http://omp.com/test/documents/?file=intake-2%20%281%29.xls', 'deleteType' = & gt; 'DELETE', )),),)
This multi-dimensional array requires values to be used. Any clue will be appreciated
Comments
Post a Comment