importFile($fileName,$_GET['for']); } $log = $_GET; $log['filepath'] = $filePath; $log['filename'] = $fileName; $log['status'] = ($result) ? 'ok' : 'failed'; $type = ($result) ? E_LOG_INFORMATIVE : E_LOG_WARNING; e107::getLog()->add('Media Upload', print_r($log,true), $type, MEDIA_01); $array = array("jsonrpc"=>"2.0", "result"=>$result,"id"=>"id"); echo json_encode($array); // Return JSON-RPC response // die('{"jsonrpc" : "2.0", "result" : null, "id" : "id"}'); ?>