Merge pull request #19729 from nextcloud/backport/19699/stable18
[stable18] Allow single file downloads so the video player works again
This commit is contained in:
commit
2b3bb179e5
1 changed files with 10 additions and 8 deletions
|
@ -545,10 +545,6 @@ class ShareController extends AuthPublicShareController {
|
||||||
throw new NotFoundException();
|
throw new NotFoundException();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($share->getHideDownload()) {
|
|
||||||
return new NotFoundResponse();
|
|
||||||
}
|
|
||||||
|
|
||||||
$userFolder = $this->rootFolder->getUserFolder($share->getShareOwner());
|
$userFolder = $this->rootFolder->getUserFolder($share->getShareOwner());
|
||||||
$originalSharePath = $userFolder->getRelativePath($share->getNode()->getPath());
|
$originalSharePath = $userFolder->getRelativePath($share->getNode()->getPath());
|
||||||
|
|
||||||
|
@ -578,13 +574,19 @@ class ShareController extends AuthPublicShareController {
|
||||||
if ($node instanceof \OCP\Files\File) {
|
if ($node instanceof \OCP\Files\File) {
|
||||||
// Single file download
|
// Single file download
|
||||||
$this->singleFileDownloaded($share, $share->getNode());
|
$this->singleFileDownloaded($share, $share->getNode());
|
||||||
} else if (!empty($files_list)) {
|
} else {
|
||||||
|
if ($share->getHideDownload()) {
|
||||||
|
return new NotFoundResponse();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($files_list)) {
|
||||||
$this->fileListDownloaded($share, $files_list, $node);
|
$this->fileListDownloaded($share, $files_list, $node);
|
||||||
} else {
|
} else {
|
||||||
// The folder is downloaded
|
// The folder is downloaded
|
||||||
$this->singleFileDownloaded($share, $share->getNode());
|
$this->singleFileDownloaded($share, $share->getNode());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* FIXME: We should do this all nicely in OCP */
|
/* FIXME: We should do this all nicely in OCP */
|
||||||
OC_Util::tearDownFS();
|
OC_Util::tearDownFS();
|
||||||
|
|
Loading…
Reference in a new issue