mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-21 14:08:10 +02:00
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:
1 parent
841ffb306c
commit
ba94e7cc7d
8 files changed
+105
-21
No files matched your search
@@ -343,7 +343,7 @@ reelsRouter.post('/reels/preview', async (req: Request, res: Response) => {
|
||||
try {
|
||||
const config = await storage.getCloudinaryConfig();
|
||||
if (config && config.logoPublicId) {
|
||||
watermarkUrl = buildMinioUrl(config.cloudName, config.logoPublicId);
|
||||
watermarkUrl = buildMinioUrl(config.cloudName, config.logoPublicId, config.publicUrl);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('Error fetching watermark configuration', e);
|
||||
@@ -556,7 +556,7 @@ async function processReelBackground(
|
||||
try {
|
||||
const config = await storage.getCloudinaryConfig();
|
||||
if (config && config.logoPublicId) {
|
||||
watermarkUrl = buildMinioUrl(config.cloudName, config.logoPublicId);
|
||||
watermarkUrl = buildMinioUrl(config.cloudName, config.logoPublicId, config.publicUrl);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('Error fetching watermark configuration', e);
|
||||
|
||||
@@ -128,7 +128,7 @@ remotionRouter.post("/render", upload.fields([{ name: "images", maxCount: 4 }, {
|
||||
try {
|
||||
const cloudinaryConfig = await dbStorage.getCloudinaryConfig();
|
||||
if (cloudinaryConfig?.cloudName && cloudinaryConfig?.logoPublicId) {
|
||||
logoUrl = buildMinioUrl(cloudinaryConfig.cloudName, cloudinaryConfig.logoPublicId);
|
||||
logoUrl = buildMinioUrl(cloudinaryConfig.cloudName, cloudinaryConfig.logoPublicId, cloudinaryConfig.publicUrl);
|
||||
console.log("🏢 Logo URL:", logoUrl);
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
Reference in new issue
Block a user