mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-28 11:05:43 +08:00
Fixed attachment base-url usage and non-existant images
Images now self-delete if the original file does not exist. Prevents simply getting non-fixable errors. Also cleaned some JS.
This commit is contained in:
@ -6,11 +6,11 @@
|
||||
* @param editor - editor instance
|
||||
*/
|
||||
function editorPaste(e, editor) {
|
||||
if (!e.clipboardData) return
|
||||
if (!e.clipboardData) return;
|
||||
let items = e.clipboardData.items;
|
||||
if (!items) return;
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
if (items[i].type.indexOf("image") === -1) return
|
||||
if (items[i].type.indexOf("image") === -1) return;
|
||||
|
||||
let file = items[i].getAsFile();
|
||||
let formData = new FormData();
|
||||
|
Reference in New Issue
Block a user