ocr worker

This commit is contained in:
m
2026-07-12 14:35:30 +02:00
parent 911592758a
commit 67096c9482
6 changed files with 73 additions and 13 deletions
+4
View File
@@ -13,6 +13,7 @@ import (
type FileHandler struct {
files *service.FileService
urls *service.URLService
ocr *service.OCRService
}
func (h *FileHandler) Upload(c *gin.Context) {
@@ -35,6 +36,9 @@ func (h *FileHandler) Upload(c *gin.Context) {
api.Error(c, http.StatusInternalServerError, "UPLOAD_ERROR", err.Error())
return
}
h.ocr.Enqueue(result.ID, result.Path)
results = append(results, gin.H{
"id": result.ID,
"name": result.Name,