Open attachment when click thumbnail on modal

This commit is contained in:
Matias De lellis
2020-06-14 18:51:22 -03:00
parent 536773843f
commit 5eaf25dfcd
6 changed files with 71 additions and 28 deletions

View File

@@ -128,6 +128,7 @@ class NoteController extends Controller {
$attachts = $this->attachMapper->findFromNote($this->userId, $note->getId());
foreach ($attachts as $attach) {
$attach->setPreviewUrl($this->fileService->getPreviewUrl($attach->getFileId(), 512));
$attach->setRedirectUrl($this->fileService->getRedirectToFileUrl($attach->getFileId()));
}
$note->setAttachts($attachts);
}
@@ -299,6 +300,7 @@ class NoteController extends Controller {
$attachts = $this->attachMapper->findFromNote($this->userId, $newnote->getId());
foreach ($attachts as $attach) {
$attach->setPreviewUrl($this->fileService->getPreviewUrl($attach->getFileId(), 512));
$attach->setRedirectUrl($this->fileService->getRedirectToFileUrl($attach->getFileId()));
}
$newnote->setAttachts($attachts);