Skip to content

Commit

Permalink
Merge pull request #6285 from nextcloud/backport/6282/stable29
Browse files Browse the repository at this point in the history
[stable29] Allow viewing of attachments when shared by mail
  • Loading branch information
mejo- committed Sep 4, 2024
2 parents 8e903fd + 7146e70 commit ad7abb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Service/AttachmentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ private function getTextFilePublic(?int $documentId, string $shareToken): File {
// is the file shared with this token?
try {
$share = $this->shareManager->getShareByToken($shareToken);
if ($share->getShareType() === IShare::TYPE_LINK) {
if (in_array($share->getShareType(), [IShare::TYPE_LINK, IShare::TYPE_EMAIL])) {
// shared file or folder?
if ($share->getNodeType() === 'file') {
$textFile = $share->getNode();
Expand Down

0 comments on commit ad7abb0

Please sign in to comment.