summaryrefslogtreecommitdiffstats
path: root/apps/files/ajax/upload.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-09-26 13:24:41 +0200
committerRobin Appelman <icewind@owncloud.com>2012-09-26 13:25:11 +0200
commitcfbca40fbee14812a69ceb5fda4db7c23645fa9c (patch)
tree5679da072aef3cfaa52d3f7783c1dc7adc939471 /apps/files/ajax/upload.php
parent2c00f8c850e3b481d270f23e99d572271f2e6f73 (diff)
downloadnextcloud-server-cfbca40fbee14812a69ceb5fda4db7c23645fa9c.tar.gz
nextcloud-server-cfbca40fbee14812a69ceb5fda4db7c23645fa9c.zip
fix sharing for newly uploaded or created files
Diffstat (limited to 'apps/files/ajax/upload.php')
-rw-r--r--apps/files/ajax/upload.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php
index fb3e277a215..a4dcd80a2e2 100644
--- a/apps/files/ajax/upload.php
+++ b/apps/files/ajax/upload.php
@@ -50,7 +50,8 @@ if(strpos($dir, '..') === false) {
$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::get($target);
- $result[]=array( "status" => "success", 'mime'=>$meta['mimetype'],'size'=>$meta['size'],'name'=>basename($target));
+ $id = OC_FileCache::getId($target);
+ $result[]=array( "status" => "success", 'mime'=>$meta['mimetype'],'size'=>$meta['size'], 'id'=>$id, 'name'=>basename($target));
}
}
OCP\JSON::encodedPrint($result);