ocr is working
This commit is contained in:
@@ -13,6 +13,7 @@ type ApplicationConfig struct {
|
||||
UploadDir string
|
||||
MaxFileSizeMB int64
|
||||
OcrLang string
|
||||
OcrWorkers int
|
||||
AuthSecret string
|
||||
AdminUsername string
|
||||
AdminPassword string
|
||||
@@ -33,12 +34,18 @@ func LoadApplicationConfig() (*ApplicationConfig, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ocrWorkers, err := getInt("OCR_WORKERS", 2)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &ApplicationConfig{
|
||||
Port: port,
|
||||
DatabaseURL: get("DATABASE_URL", "postgres://vaultdrop:vaultdrop@localhost:5432/vaultdrop_dev?sslmode=disable"),
|
||||
UploadDir: get("UPLOAD_DIR", "./uploads"),
|
||||
MaxFileSizeMB: int64(maxSize),
|
||||
OcrLang: get("OCR_LANG", "fra+eng"),
|
||||
OcrWorkers: ocrWorkers,
|
||||
AuthSecret: get("AUTH_SECRET", "dev-secret-change-me"),
|
||||
AdminUsername: get("ADMIN_USERNAME", ""),
|
||||
AdminPassword: get("ADMIN_PASSWORD", ""),
|
||||
|
||||
Reference in New Issue
Block a user