Completed
Branch master (0f7120)
by Janis
02:51
created
appinfo/routes.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
18 18
  * it's instantiated in there
19 19
  */
20 20
 return [
21
-    'routes' => [
21
+	'routes' => [
22 22
 		['name' => 'ocr#process', 'url' => '/process', 'verb' => 'GET'],
23 23
 		['name' => 'ocr#languages', 'url' => '/languages', 'verb' => 'GET'],
24
-    ]
24
+	]
25 25
 ];
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
controller/ocrcontroller.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,15 +79,15 @@
 block discarded – undo
79 79
 				$newName = \OCP\Files::buildNotExistingFileName($srcDir,$srcFile.'_OCR.pdf'); // new filename (and in case it exists already it will be build other way)
80 80
 				$success = $this->ocrmypdf($fileInfo, $newName, $language);
81 81
 				$message = $success ? 'OCR_SUCCESS' : 'OCR_ERROR';
82
-			}elseif ($mtype == 'image/png' || $mtype == 'image/jpeg' || $mtype == 'image/tiff'){
82
+			} elseif ($mtype == 'image/png' || $mtype == 'image/jpeg' || $mtype == 'image/tiff'){
83 83
 				$newName = \OCP\Files::buildNotExistingFileName($srcDir,$srcFile.'_OCR.txt'); // new filename (and in case it exists already it will be build other way)
84 84
 				$success = $this->tesseract($fileInfo, $newName, $language);
85 85
 				$message = $success ? 'OCR_SUCCESS' : 'OCR_ERROR';
86
-			}else{
86
+			} else{
87 87
 				$success = false;
88 88
 				$message = 'WRONG_MIMETYPE'; // wrong mimetype
89 89
 			}
90
-		}else{
90
+		} else{
91 91
 			$success = false;
92 92
 			$message = 'WRONG_PARAMETERS'; // parameters not set
93 93
 		}
Please login to merge, or discard this patch.