feat: enhance media management with EXIF data extraction, metadata filtering, and storage path generation

refactor: update configuration handling to use environment variables and improve code organization
This commit is contained in:
2025-11-14 11:22:51 +01:00
parent 70dc0a7131
commit 3c3b51a2a7
24 changed files with 393 additions and 181 deletions

View File

@@ -1,25 +1 @@
use libertas_core::{
config::{Config, DatabaseConfig, DatabaseType},
error::CoreResult,
};
pub fn load_config() -> CoreResult<Config> {
Ok(Config {
database: DatabaseConfig {
db_type: DatabaseType::Postgres,
url: "postgres://libertas:libertas_password@localhost:5436/libertas_db".to_string(),
},
server_address: "127.0.0.1:8080".to_string(),
jwt_secret: "super_secret_jwt_key".to_string(),
media_library_path: "media_library".to_string(),
broker_url: "nats://localhost:4222".to_string(),
max_upload_size_mb: Some(100),
default_storage_quota_gb: Some(10),
allowed_sort_columns: Some(vec![
"date_taken".to_string(),
"created_at".to_string(),
"original_filename".to_string(),
]),
thumbnail_config: None,
})
}
pub use libertas_core::config::load_config;