mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-11 03:38:02 +00:00
fix: image pasted into a note right after another save is lost on reload (#32175)
Pasting an image into a note a moment after another change to that note was saved could lose the image. The note page got the result of the earlier save back after the paste and took over its older, empty list of attached files, so the image was saved without its file. After a reload it showed as a grey placeholder and was missing from the PDF export. The note page now keeps its own attached files while it still has a change waiting to be saved. Fixes #32123
This commit is contained in:
parent
d12bf062b5
commit
93838060b2
1 changed files with 2 additions and 1 deletions
|
|
@ -885,7 +885,8 @@ ${content}
|
|||
note.access_grants = _note.access_grants;
|
||||
}
|
||||
|
||||
if (_note.data && 'files' in _note.data) {
|
||||
// A pending local save holds newer files than an echo of an earlier save.
|
||||
if (_note.data && 'files' in _note.data && !debounceTimeout) {
|
||||
files = _note.data.files ?? [];
|
||||
note.data.files = files.length > 0 ? files : null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue