How to call UploadHandler.php with PHP - blueimp jQuery File Upload -


does know how upload images using php , calling uploadhandler.php?

i'm not sure information needs passed , in format.

here's have far:

$prop="test"; session_id($prop); @session_start(); $url = 'http://christinewilson.ca/wp-content/uploads/2013/02/port_rhdefence.png'; $file_name[] = file_get_contents($url);  error_reporting(e_all | e_strict); require('uploadhandler.php'); $upload_handler = new uploadhandler(array(     'user_dirs' => true )); 

i not find way file name via php had myself.

first need add public variable under uploadhandler.php

class uploadhandler {     public $file_name;     protected $options; 

and add function creates name

protected function get_file_name($name,         $type = null, $index = null, $content_range = null) {      $this->file_name = $this->get_unique_filename(         $this->trim_file_name($name, $type, $index, $content_range),         $type,         $index,         $content_range     );     return $this->file_name; } 

then under index.php this

$upload_handler = new uploadhandler(); echo "\r\n [" . $upload_handler->filename . "]\r\n"; 

i hope or save time :)


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -