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
Binary file not shown.
|
After Width: | Height: | Size: 271 KiB |
+5
-3
@@ -684,14 +684,16 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Save to database
|
// 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({
|
const mediaItem = await storage.createMedia({
|
||||||
userId,
|
userId,
|
||||||
type: "image",
|
type: "image",
|
||||||
cloudinaryPublicId: uploadResult.publicId,
|
cloudinaryPublicId: uploadResult.publicId,
|
||||||
originalUrl: uploadResult.originalUrl,
|
originalUrl: uploadResult.originalUrl,
|
||||||
facebookFeedUrl: uploadResult.facebookFeedUrl,
|
facebookFeedUrl: uploadResult.originalUrl, // Use original with overlays
|
||||||
instagramFeedUrl: uploadResult.instagramFeedUrl,
|
instagramFeedUrl: uploadResult.originalUrl, // Use original with overlays
|
||||||
instagramStoryUrl: uploadResult.instagramStoryUrl,
|
instagramStoryUrl: uploadResult.originalUrl, // Use original with overlays
|
||||||
fileName: `edited_${Date.now()}.jpg`,
|
fileName: `edited_${Date.now()}.jpg`,
|
||||||
fileSize: outputBuffer.length,
|
fileSize: outputBuffer.length,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user