From 6daedaf344b33c2c7b031f00117e4235d30f226f Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 12 Jan 2015 14:41:41 +0100 Subject: [PATCH] Send the proper original name for uploaded files --- apps/files/ajax/upload.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index fcee0166da..7bf6c40e87 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;