Added command to download all external-only attachments to the local file system

This commit is contained in:
Jan Böhmer 2025-03-29 13:33:35 +01:00
parent 57f0432a87
commit 53da45d7d7
2 changed files with 139 additions and 2 deletions

View file

@ -75,8 +75,9 @@ class AttachmentRepository extends DBElementRepository
{
$qb = $this->createQueryBuilder('attachment');
$qb->select('COUNT(attachment)')
->andWhere('attachment.internal_path IS NULL')
->where('attachment.external_path IS NOT NULL');
->where('attachment.external_path IS NOT NULL')
->andWhere('attachment.internal_path IS NULL');
$query = $qb->getQuery();
return (int) $query->getSingleScalarResult();