Merge pull request #7126 from nickvergessen/issue/6683
Only add files to file list when uploading to current directory
This commit is contained in:
commit
6b5a7035ee
2 changed files with 6 additions and 4 deletions
|
@ -139,7 +139,8 @@ if (strpos($dir, '..') === false) {
|
|||
'originalname' => $files['tmp_name'][$i],
|
||||
'uploadMaxFilesize' => $maxUploadFileSize,
|
||||
'maxHumanFilesize' => $maxHumanFileSize,
|
||||
'permissions' => $meta['permissions'] & $allowedPermissions
|
||||
'permissions' => $meta['permissions'] & $allowedPermissions,
|
||||
'directory' => \OC\Files\Filesystem::normalizePath(stripslashes($dir)),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -166,7 +167,8 @@ if (strpos($dir, '..') === false) {
|
|||
'originalname' => $files['tmp_name'][$i],
|
||||
'uploadMaxFilesize' => $maxUploadFileSize,
|
||||
'maxHumanFilesize' => $maxHumanFileSize,
|
||||
'permissions' => $meta['permissions'] & $allowedPermissions
|
||||
'permissions' => $meta['permissions'] & $allowedPermissions,
|
||||
'directory' => \OC\Files\Filesystem::normalizePath(stripslashes($dir)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -922,8 +922,8 @@ $(document).ready(function() {
|
|||
data.context.find('td.filesize').text(humanFileSize(size));
|
||||
|
||||
} else {
|
||||
// only append new file if dragged onto current dir's crumb (last)
|
||||
if (data.context && data.context.hasClass('crumb') && !data.context.hasClass('last')) {
|
||||
// only append new file if uploaded into the current folder
|
||||
if (file.directory !== FileList.getCurrentDirectory()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue