aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-01-12 14:41:41 +0100
committerRobin Appelman <icewind@owncloud.com>2015-01-12 15:30:47 +0100
commit6daedaf344b33c2c7b031f00117e4235d30f226f (patch)
tree7bae5084b36a054adb3d535dec78bc7330a278cc
parent5f7c115dfee58db718d0887562a5a8df8ccc7279 (diff)
downloadnextcloud-server-6daedaf344b33c2c7b031f00117e4235d30f226f.tar.gz
nextcloud-server-6daedaf344b33c2c7b031f00117e4235d30f226f.zip
Send the proper original name for uploaded files
-rw-r--r--apps/files/ajax/upload.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php
index fcee0166da6..7bf6c40e87c 100644
--- a/apps/files/ajax/upload.php
+++ b/apps/files/ajax/upload.php
@@ -168,7 +168,7 @@ if (strpos($dir, '..') === false) {
} else {
$data = \OCA\Files\Helper::formatFileInfo($meta);
$data['status'] = 'success';
- $data['originalname'] = $files['tmp_name'][$i];
+ $data['originalname'] = $files['name'][$i];
$data['uploadMaxFilesize'] = $maxUploadFileSize;
$data['maxHumanFilesize'] = $maxHumanFileSize;
$data['permissions'] = $meta['permissions'] & $allowedPermissions;
@@ -195,7 +195,7 @@ if (strpos($dir, '..') === false) {
} else {
$data['status'] = 'readonly';
}
- $data['originalname'] = $files['tmp_name'][$i];
+ $data['originalname'] = $files['name'][$i];
$data['uploadMaxFilesize'] = $maxUploadFileSize;
$data['maxHumanFilesize'] = $maxHumanFileSize;
$data['permissions'] = $meta['permissions'] & $allowedPermissions;