mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-28 18:01:48 +08:00
Images: Rolled out image memory handling to image actions
- Moved thumnbail loading out of repo into ImageResizer. - Updated gallery and editor image handling to show errors where possible to indicate memory issues for resizing/thumbs. - Updated gallery to load image data in a per-image basis via edit form for more resiliant thumb/data fetching. Data was previously provided via gallery listing, which could be affected by failing generation of other images. - Updated image manager double click handling to be more pleasant and not flash away the edit form. - Updated editor handlers to use main URL when thumbs fail to load.
This commit is contained in:
@ -61,7 +61,7 @@ function paste(editor, options, event) {
|
||||
editor.dom.replace(newEl, id);
|
||||
}).catch(err => {
|
||||
editor.dom.remove(id);
|
||||
window.$events.emit('error', options.translations.imageUploadErrorText);
|
||||
window.$events.error(err?.data?.message || options.translations.imageUploadErrorText);
|
||||
console.error(err);
|
||||
});
|
||||
}, 10);
|
||||
|
Reference in New Issue
Block a user