Skip to content

Commit

Permalink
feat: update pdfservice
Browse files Browse the repository at this point in the history
Signed-off-by: Luka Trovic <luka@nextcloud.com>
  • Loading branch information
luka-nextcloud committed Jul 9, 2024
1 parent a79fafd commit dd31b09
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/Service/PdfService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ public function __construct(
}

public function extractFields(Node $file): array {
$dataDir = $this->config->getSystemValue('datadirectory');
$filePath = $dataDir . $file->getPath();
$filePath = $file->getStorage()->getLocalFile($file->getInternalPath());

try {
$pdf = new Pdf($filePath);
Expand All @@ -37,7 +36,6 @@ public function extractFields(Node $file): array {
}
return $templateFields;
} catch (\Exception $e) {
// Log
$this->logger->debug('Failed to extract fields from PDF: {error}', ['error' => $e->getMessage()]);
return [];
}
Expand Down

0 comments on commit dd31b09

Please sign in to comment.