|
@@ 640-651 (lines=12) @@
|
| 637 |
|
* |
| 638 |
|
* @throws NotPermittedException |
| 639 |
|
*/ |
| 640 |
|
private function extractContentFromFilePDF(FilesDocument $document, File $file) { |
| 641 |
|
|
| 642 |
|
if ($this->parseMimeType($document->getMimeType()) !== self::MIMETYPE_PDF) { |
| 643 |
|
return; |
| 644 |
|
} |
| 645 |
|
|
| 646 |
|
if ($this->configService->getAppValue('files_pdf') !== '1') { |
| 647 |
|
return; |
| 648 |
|
} |
| 649 |
|
|
| 650 |
|
$document->setContent(base64_encode($file->getContent()), IndexDocument::ENCODED_BASE64); |
| 651 |
|
} |
| 652 |
|
|
| 653 |
|
|
| 654 |
|
/** |
|
@@ 660-671 (lines=12) @@
|
| 657 |
|
* |
| 658 |
|
* @throws NotPermittedException |
| 659 |
|
*/ |
| 660 |
|
private function extractContentFromFileOffice(FilesDocument $document, File $file) { |
| 661 |
|
|
| 662 |
|
if ($this->configService->getAppValue('files_office') !== '1') { |
| 663 |
|
return; |
| 664 |
|
} |
| 665 |
|
|
| 666 |
|
if ($this->parseMimeType($document->getMimeType()) !== self::MIMETYPE_OFFICE) { |
| 667 |
|
return; |
| 668 |
|
} |
| 669 |
|
|
| 670 |
|
$document->setContent(base64_encode($file->getContent()), IndexDocument::ENCODED_BASE64); |
| 671 |
|
} |
| 672 |
|
|
| 673 |
|
|
| 674 |
|
/** |