diff options
Diffstat (limited to 'files')
-rw-r--r-- | files/ajax/upload.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/files/ajax/upload.php b/files/ajax/upload.php index 67611fb893e..f8b8f0e2e5f 100644 --- a/files/ajax/upload.php +++ b/files/ajax/upload.php @@ -49,7 +49,8 @@ if(strpos($dir,'..') === false){ for($i=0;$i<$fileCount;$i++){ $target=stripslashes($dir) . $files['name'][$i]; if(is_uploaded_file($files['tmp_name'][$i]) and OC_Filesystem::fromTmpFile($files['tmp_name'][$i],$target)){ - $result[]=array( "status" => "success", 'mime'=>OC_Filesystem::getMimeType($target),'size'=>OC_Filesystem::filesize($target),'name'=>$files['name'][$i]); + $meta=OC_FileCache::getCached($target); + $result[]=array( "status" => "success", 'mime'=>$meta['mimetype'],'size'=>$meta['size'],'name'=>$files['name'][$i]); } } OC_JSON::encodedPrint($result); |