|
@@ 238-244 (lines=7) @@
|
| 235 |
|
$filePath = substr_replace ( $filePath, '', $pos, strlen ( '/' ) ); // '/' => '' || '/Test/' => 'Test' |
| 236 |
|
} |
| 237 |
|
|
| 238 |
|
if ($fileInfo->getMimetype () === OcrConstants::MIME_TYPE_PDF) { |
| 239 |
|
// PDFs: |
| 240 |
|
return \OCP\Files::buildNotExistingFileName ( $filePath, $fileName . '_OCR.pdf' ); |
| 241 |
|
} else { |
| 242 |
|
// IMAGES: |
| 243 |
|
return \OCP\Files::buildNotExistingFileName ( $filePath, $fileName . '_OCR.txt' ); |
| 244 |
|
} |
| 245 |
|
} catch ( Exception $e ) { |
| 246 |
|
$this->handleException ( $e ); |
| 247 |
|
} |
|
@@ 280-286 (lines=7) @@
|
| 277 |
|
$filePath = substr_replace ( $filePath, '', $pos, strlen ( '/' ) ); // '/Test' => '// 'Test' || '/' => '' |
| 278 |
|
} |
| 279 |
|
|
| 280 |
|
if ($fileInfo->getMimetype () === OcrConstants::MIME_TYPE_PDF) { |
| 281 |
|
// PDFs: |
| 282 |
|
return \OCP\Files::buildNotExistingFileName ( $filePath, $fileName . '_OCR.pdf' ); |
| 283 |
|
} else { |
| 284 |
|
// IMAGES: |
| 285 |
|
return \OCP\Files::buildNotExistingFileName ( $filePath, $fileName . '_OCR.txt' ); |
| 286 |
|
} |
| 287 |
|
} catch ( Exception $e ) { |
| 288 |
|
$this->handleException ( $e ); |
| 289 |
|
} |