@@ 335-341 (lines=7) @@ | ||
332 | $filePath = substr_replace($filePath, '', $pos, strlen('/')); // '/' => '' || '/Test/' => 'Test' |
|
333 | } |
|
334 | ||
335 | if ($fileInfo->getMimetype() === $this::MIMETYPE_PDF) { |
|
336 | // PDFs: |
|
337 | return \OCP\Files::buildNotExistingFileName($filePath, $fileName . '_OCR.pdf'); |
|
338 | } else { |
|
339 | // IMAGES: |
|
340 | return \OCP\Files::buildNotExistingFileName($filePath, $fileName . '_OCR.txt'); |
|
341 | } |
|
342 | } catch (Exception $e) { |
|
343 | $this->handleException($e); |
|
344 | } |
|
@@ 376-382 (lines=7) @@ | ||
373 | $filePath = substr_replace($filePath, '', $pos, strlen('/')); // '/Test' => '// 'Test' || '/' => '' |
|
374 | } |
|
375 | ||
376 | if ($fileInfo->getMimetype() === $this::MIMETYPE_PDF) { |
|
377 | // PDFs: |
|
378 | return \OCP\Files::buildNotExistingFileName($filePath, $fileName . '_OCR.pdf'); |
|
379 | } else { |
|
380 | // IMAGES: |
|
381 | return \OCP\Files::buildNotExistingFileName($filePath, $fileName . '_OCR.txt'); |
|
382 | } |
|
383 | } catch (Exception $e) { |
|
384 | $this->handleException($e); |
|
385 | } |