feat: dedicated list view for document batch downloading

This commit is contained in:
Björn Fromme
2025-02-01 11:42:21 +01:00
parent 3f839f9082
commit 24c8c46ca4
7 changed files with 195 additions and 18 deletions
+8 -6
View File
@@ -33,12 +33,14 @@ class DownloadController extends AbstractController
$inline = (bool) $request->get('inline');
$disposition = $inline ? ResponseHeaderBag::DISPOSITION_INLINE : ResponseHeaderBag::DISPOSITION_ATTACHMENT;
// mark file downloaded
$upload
->setDownloaded()
->setDownloadedBy($this->getUser()->getUserIdentifier())
;
$this->entityManager->flush();
// mark file downloaded if applicable
if ($this->isGranted('ROLE_ADMINISTRATIVE' && false === $inline)) {
$upload
->setDownloaded()
->setDownloadedBy($this->getUser()->getUserIdentifier())
;
$this->entityManager->flush();
}
$this->logger->info('Download file', [
'file_id' => $upload->getId(),