mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-09 10:22:51 +03:00
Started extraction of image controller to separate controllers
This commit is contained in:
@@ -66,4 +66,13 @@ function drawPostMessage(data) {
|
||||
iFrame.contentWindow.postMessage(JSON.stringify(data), '*');
|
||||
}
|
||||
|
||||
export default {show, close};
|
||||
async function upload(imageData, pageUploadedToId) {
|
||||
let data = {
|
||||
image: imageData,
|
||||
uploaded_to: pageUploadedToId,
|
||||
};
|
||||
const resp = await window.$http.post(window.baseUrl(`/images/drawio`), data);
|
||||
return resp.data;
|
||||
}
|
||||
|
||||
export default {show, close, upload};
|
Reference in New Issue
Block a user