feat: Add MinIO endpoint/public URL configuration via settings UI

Store endpointUrl and publicUrl in cloudinary_config DB table so
MinIO connection can be fully configured from the app settings
without needing environment variables.

- DB migration: adds endpoint_url and public_url columns
- Schema: adds endpointUrl/publicUrl to cloudinaryConfig table
- MinIO service: reads endpoint from DB (falls back to MINIO_ENDPOINT env)
- buildMinioUrl: accepts optional publicUrl override from DB config
- All routes updated to pass config.publicUrl to buildMinioUrl
- Settings UI (desktop + mobile): adds Endpoint URL and Public URL fields

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Sonnet 4.6 committed 2026-03-24 21:19:49 +01:00
1 parent 841ffb306c
commit ba94e7cc7d
8 files changed
+105 -21

No files matched your search

+2 -2
View File
@@ -822,7 +822,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
if (cloudinaryConfig && cloudinaryConfig.logoPublicId) {
try {
// Build logo URL from Cloudinary
const logoUrl = buildMinioUrl(cloudinaryConfig.cloudName, cloudinaryConfig.logoPublicId);
const logoUrl = buildMinioUrl(cloudinaryConfig.cloudName, cloudinaryConfig.logoPublicId, cloudinaryConfig.publicUrl);
console.log("📥 Downloading logo from:", logoUrl);
// Download logo
@@ -1631,7 +1631,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
// Don't send the API secret to the client
const { apiSecret, ...safeConfig } = config;
const logoUrl = config.logoPublicId ? buildMinioUrl(config.cloudName, config.logoPublicId) : null;
const logoUrl = config.logoPublicId ? buildMinioUrl(config.cloudName, config.logoPublicId, config.publicUrl) : null;
res.json({ ...safeConfig, logoUrl });
} catch (error) {
console.error("Error fetching Cloudinary config:", error);