Send the proper original name for uploaded files

This commit is contained in:
Robin Appelman 2015-01-12 14:41:41 +01:00
parent 5f7c115dfe
commit 6daedaf344
1 changed files with 2 additions and 2 deletions

View File

@ -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;