mirror of
https://github.com/e107inc/e107.git
synced 2025-08-12 09:34:54 +02:00
Fixes #651 - Media-Manager - Uploaded file does not display in selection.
This commit is contained in:
@@ -140,12 +140,23 @@ if (!$chunks || $chunk == $chunks - 1) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// rename($targetDir.$fileName,e_MEDIA."images/2012-05/",$fileName);
|
||||
if($_GET['for'] !='') // leave in upload directory if no category given.
|
||||
{
|
||||
$result = e107::getMedia()->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);
|
||||
|
Reference in New Issue
Block a user