Don't get metadata directly from the 'cached' file cache after upload

This commit is contained in:
Michael Gapczynski 2012-09-12 17:00:25 -04:00
parent 9bfdf47cd4
commit 87b7a23648
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ if(strpos($dir, '..') === false) {
for($i=0;$i<$fileCount;$i++) {
$target = OCP\Files::buildNotExistingFileName(stripslashes($dir), $files['name'][$i]);
if(is_uploaded_file($files['tmp_name'][$i]) and OC_Filesystem::fromTmpFile($files['tmp_name'][$i], $target)) {
$meta=OC_FileCache_Cached::get($target);
$meta = OC_FileCache::get($target);
$result[]=array( "status" => "success", 'mime'=>$meta['mimetype'],'size'=>$meta['size'],'name'=>basename($target));
}
}