mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1927] Store gallery images as managed files instead of inline data URLs #943
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#943
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Xelvanis on GitHub (Jun 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1927
Originally assigned to: @cha1latte on GitHub.
Summary
Chat and character gallery image uploads/generated illustrations are stored as inline
data:imagevalues in storage records instead of managed files. Legacy wrote gallery media todata/gallery/...and served it through file routes.Expected behavior
Gallery uploads and generated gallery images should be persisted as managed media files, with storage records carrying stable file metadata/URLs. Deletes and cleanup should remove the matching file, and remote runtime should have a managed asset path for gallery media.
Actual behavior
Refactor gallery upload builds a base64 data URL and stores it directly in the row. Generated illustrations also create
galleryrows withurlset to a data URL. The remote managed asset route supportsavatar,background,font,game, andlorebook, but notgallery.Evidence:
src-tauri/src/commands/storage/shared.rs:2251creates gallery records and storesurlasdata:<mime>;base64,....src/engine/generation/start-generation.ts:744creates generatedgalleryrows withurl: imageUrl.src-tauri/src/http_server.rs:199does not include agallerymanaged asset kind.packages/server/src/routes/gallery.routes.ts:118andpackages/server/src/services/image/image-generation.ts:210.Steps to reproduce
galleryorcharacter-gallerystorage record.urlcontains inlinedata:imagepayload and no durable managed gallery asset URL/path is used.Impact area
Environment
8c36be60Logs, screenshots, or video
No runtime logs or screenshots. Static parity evidence only.
Regression notes
Legacy stored chat gallery images under
data/gallery/<chatId>and generated images throughsaveImageToDisk(...). Refactor currently stores base64 payloads in storage records.Additional context
This came from parity target 4, media and assets, under #1904. Suggested fix path: persist chat/character gallery media as managed files, add a
gallerymanaged asset kind for remote runtime, make gallery UI resolve managed gallery URLs, delete files on record deletion, and migrate/repair existing data URL rows where practical.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:
@cha1latte commented on GitHub (Jun 2, 2026):
fixed in #1941