feat: dedicated list view for document batch downloading
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user