namespace Lagerbestand.Models; /// /// File storage settings for NFS/disk-based file storage /// public class FileStorageSettings { /// /// Base path for file storage (e.g., /mnt/nfs/attachments or C:\Storage\Attachments) /// public string BasePath { get; set; } = string.Empty; /// /// Whether file storage is configured and enabled /// public bool IsEnabled { get; set; } /// /// Maximum file size in bytes (default: 10 MB) /// public long MaxFileSizeBytes { get; set; } = 10 * 1024 * 1024; /// /// Validates if the storage path is accessible /// public bool IsPathAccessible() { if (string.IsNullOrWhiteSpace(BasePath)) return false; try { return Directory.Exists(BasePath); } catch { return false; } } /// /// Gets the full path for a given relative file path /// public string GetFullPath(string relativePath) { return Path.Combine(BasePath, relativePath); } }