|
|
@ -225,13 +225,16 @@ export default class PostEditor {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
handleImageUpload(type, files) {
|
|
|
|
handleImageUpload(type, files) {
|
|
|
|
let self = this;
|
|
|
|
let self = this;
|
|
|
|
|
|
|
|
notify.alert('Uploading Image', null);
|
|
|
|
admin
|
|
|
|
admin
|
|
|
|
.imageUpload(type, files)
|
|
|
|
.imageUpload(type, files)
|
|
|
|
.then(r => {
|
|
|
|
.then(r => {
|
|
|
|
if (r.type == DataEvent.POST_IMAGE_ADDED)
|
|
|
|
if (r.type == DataEvent.POST_IMAGE_ADDED)
|
|
|
|
self.editor.notify(EditorEvent.EDITOR_UPLOAD_POST_IMAGE, r.url);
|
|
|
|
self.editor.notify(EditorEvent.EDITOR_UPLOAD_POST_IMAGE, r.url);
|
|
|
|
|
|
|
|
notify.alert('Image Added to Entry', true);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
.catch(() => {
|
|
|
|
|
|
|
|
notify.alert('Uh oh. Image not added', false);
|
|
|
|
//console.log('ERROR', err);
|
|
|
|
//console.log('ERROR', err);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|