mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +02:00
Update how image URLs are stored to preserve edits
Adjust image URL storage to consistently use the original URL for all formats when edited images with overlays are present. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/Hpj2VzR
This commit is contained in:
1 parent
523412bce4
commit
bf07167663
2 files changed
+5
-3
No files matched your search
+5
-3
@@ -684,14 +684,16 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
);
|
||||
|
||||
// Save to database
|
||||
// IMPORTANT: For edited images with overlays, use originalUrl for ALL formats
|
||||
// because Cloudinary transformations would recreate versions WITHOUT the overlays
|
||||
const mediaItem = await storage.createMedia({
|
||||
userId,
|
||||
type: "image",
|
||||
cloudinaryPublicId: uploadResult.publicId,
|
||||
originalUrl: uploadResult.originalUrl,
|
||||
facebookFeedUrl: uploadResult.facebookFeedUrl,
|
||||
instagramFeedUrl: uploadResult.instagramFeedUrl,
|
||||
instagramStoryUrl: uploadResult.instagramStoryUrl,
|
||||
facebookFeedUrl: uploadResult.originalUrl, // Use original with overlays
|
||||
instagramFeedUrl: uploadResult.originalUrl, // Use original with overlays
|
||||
instagramStoryUrl: uploadResult.originalUrl, // Use original with overlays
|
||||
fileName: `edited_${Date.now()}.jpg`,
|
||||
fileSize: outputBuffer.length,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user