Fix unneeded image processing
This commit is contained in:
@@ -178,8 +178,9 @@ public class StoryController {
|
||||
|
||||
Story updatedStory = storyService.updateWithTagNames(id, request);
|
||||
|
||||
// Process external images in content after saving
|
||||
updatedStory = processExternalImagesIfNeeded(updatedStory);
|
||||
// Image processing for updates is handled by the frontend via the dedicated
|
||||
// /process-content-images endpoint, so no async processing is triggered here.
|
||||
// (Async processing on every PUT caused concurrent duplicate downloads.)
|
||||
|
||||
logger.info("Successfully updated story: {}", updatedStory.getTitle());
|
||||
return ResponseEntity.ok(convertToDto(updatedStory));
|
||||
|
||||
@@ -225,6 +225,8 @@ export default function EditStoryPage() {
|
||||
...(formData.authorId ? { authorId: formData.authorId } : { authorName: formData.authorName }),
|
||||
tagNames: formData.tags,
|
||||
});
|
||||
// Keep editor state in sync with local URLs so subsequent saves don't re-download
|
||||
setFormData(prev => ({ ...prev, contentHtml: imageResult.processedContent }));
|
||||
}
|
||||
} catch (imageError) {
|
||||
console.warn('Failed to process images, continuing with original content:', imageError);
|
||||
|
||||
Reference in New Issue
Block a user