73a0222e56
- Add original_file_path and processed_file_path columns to FileRecord model
- Create database migration for new fields
- Implement get_unique_filepath_with_counter() with -0001 suffix format
- Update process_document to save immutable copy to /workdir/original
- Add force_cloud_ocr parameter to process_document for forced OCR
- Update embed_metadata to use new collision handling
- Update metadata JSON to include file path references
- Add /files/{file_id}/reprocess-with-cloud-ocr API endpoint
- Update processed_file_path in database during embedding
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
12 lines
511 B
Python
12 lines
511 B
Python
"""
|
|
Utility functions and helpers for the document processor application.
|
|
"""
|
|
|
|
# Import functions to make them available through the package
|
|
from app.utils.file_operations import hash_file
|
|
from app.utils.filename_utils import get_unique_filepath_with_counter, sanitize_filename
|
|
from app.utils.logging import log_task_progress
|
|
|
|
# Export all the functions that should be available when importing from app.utils
|
|
__all__ = ["hash_file", "log_task_progress", "get_unique_filepath_with_counter", "sanitize_filename"]
|