.
This commit is contained in:
@@ -375,6 +375,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
function ocr2(url, input) {
|
function ocr2(url, input) {
|
||||||
|
console.log("OCR", url, input)
|
||||||
Tesseract.recognize(
|
Tesseract.recognize(
|
||||||
url,
|
url,
|
||||||
'eng',
|
'eng',
|
||||||
@@ -427,7 +428,14 @@
|
|||||||
n = el.id.split("-")[1];
|
n = el.id.split("-")[1];
|
||||||
$(`#drop-filenames span[data-input-id='${el.id}']`).remove();
|
$(`#drop-filenames span[data-input-id='${el.id}']`).remove();
|
||||||
|
|
||||||
let extra_class = "";
|
let extra_class = " image-ident-loading";
|
||||||
|
if ($(el).hasClass("image-ident-warning")) {
|
||||||
|
extra_class = " image-ident-warning";
|
||||||
|
} else if ($(el).hasClass("image-ident-ok")) {
|
||||||
|
extra_class = " image-ident-ok";
|
||||||
|
}
|
||||||
|
|
||||||
|
//let extra_class = "";
|
||||||
let imageId;
|
let imageId;
|
||||||
if (el.files[0].type.startsWith("image")) {
|
if (el.files[0].type.startsWith("image")) {
|
||||||
base = await blobToBase64(el.files[0]);
|
base = await blobToBase64(el.files[0]);
|
||||||
@@ -437,12 +445,6 @@
|
|||||||
$(el).parent().parent().prepend(element);
|
$(el).parent().parent().prepend(element);
|
||||||
|
|
||||||
|
|
||||||
extra_class = " image-ident-loading";
|
|
||||||
if ($(el).hasClass("image-ident-warning")) {
|
|
||||||
extra_class = " image-ident-warning";
|
|
||||||
} else if ($(el).hasClass("image-ident-ok")) {
|
|
||||||
extra_class = " image-ident-ok";
|
|
||||||
}
|
|
||||||
ocr2(url, el);
|
ocr2(url, el);
|
||||||
|
|
||||||
$("#drop-filenames").append(
|
$("#drop-filenames").append(
|
||||||
|
|||||||
Reference in New Issue
Block a user