mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-27 11:58:49 +01:00
🎨 Re OCR popup prompt when Tesseract is not enabled https://github.com/siyuan-note/siyuan/issues/15367
This commit is contained in:
parent
7787ac6e1d
commit
70741fffcc
15 changed files with 40 additions and 15 deletions
|
|
@ -153,7 +153,14 @@ func ocr(c *gin.Context) {
|
|||
|
||||
path := arg["path"].(string)
|
||||
|
||||
ocrJSON := util.OcrAsset(path)
|
||||
ocrJSON, err := util.OcrAsset(path)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
ret.Data = map[string]interface{}{"closeTimeout": 7000}
|
||||
return
|
||||
}
|
||||
|
||||
ret.Data = map[string]interface{}{
|
||||
"text": util.GetOcrJsonText(ocrJSON),
|
||||
"ocrJSON": ocrJSON,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue