Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-10-16 23:28:08 +08:00
parent 1a56f872be
commit 5d015b516c
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 19 additions and 11 deletions

View file

@ -113,7 +113,15 @@ func getImageOCRText(c *gin.Context) {
return
}
path := arg["path"].(string)
var path string
if nil == arg["path"] {
ret.Data = map[string]interface{}{
"text": "",
}
return
} else {
path = arg["path"].(string)
}
ret.Data = map[string]interface{}{
"text": util.GetAssetText(path),