aboutsummaryrefslogtreecommitdiffstats
path: root/files
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-02-21 20:48:14 +0100
committerRobin Appelman <icewind@owncloud.com>2012-02-21 20:48:49 +0100
commitc20319d37701efb9d32c38dd71880739ca75b33f (patch)
tree1f2f523650e24ea0d1cefd02f653cb85eee57c37 /files
parentd9c7e4c333f858efaaee35d26ea12733d29bd694 (diff)
downloadnextcloud-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.php3
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);