diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-02-21 20:48:14 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-02-21 20:48:49 +0100 |
commit | c20319d37701efb9d32c38dd71880739ca75b33f (patch) | |
tree | 1f2f523650e24ea0d1cefd02f653cb85eee57c37 /files | |
parent | d9c7e4c333f858efaaee35d26ea12733d29bd694 (diff) | |
download | nextcloud-server-c20319d37701efb9d32c38dd71880739ca75b33f.tar.gz nextcloud-server-c20319d37701efb9d32c38dd71880739ca75b33f.zip |
fix incorrect information in the filecache when using encryption
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 241edc216ff..034b8914607 100644 --- a/files/ajax/upload.php +++ b/files/ajax/upload.php @@ -48,7 +48,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); |