hotfix for images in editor uploads

pull/84/head
Are0h 3 years ago
parent 9baaed6d50
commit aa3301fb66

@ -4,6 +4,7 @@ namespace brain\api\v1;
use brain\data\Member; use brain\data\Member;
use brain\data\Settings; use brain\data\Settings;
use brain\utility\FileUploader;
class ImagesAPI class ImagesAPI
{ {

@ -37,9 +37,9 @@
{% block stylesheets %} {% block stylesheets %}
<link rel="stylesheet" type="text/css" href="/assets/css/dash.css?=vbhj"> <link rel="stylesheet" type="text/css" href="/assets/css/dash.css?=vbhj">
{% endblock %} {% endblock %}
{% block mainContent %} {% block mainContent %}
<div id="post-edit-index" data-index="{{ id }}" data-uuid="{{ uuid }}" data-slug="{{ slug }}" data-layout="{{ layout }}"> <div id="post-edit-index" data-index="{{ id }}" data-uuid="{{ uuid }}" data-slug="{{ slug }}" data-layout="{{ layout }}">
<div id="post-edit-index-wrapper"> <div id="post-edit-index-wrapper">
<div id="post-feature"> <div id="post-feature">
@ -174,8 +174,8 @@
</div> </div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% block javascripts %} {% block javascripts %}
<script src="/assets/scripts/Start.js?=erty" type="text/javascript"></script> <script src="/assets/scripts/Start.js?=dfdfvd" type="text/javascript"></script>
{% endblock %} {% endblock %}

File diff suppressed because one or more lines are too long

@ -19,7 +19,7 @@ export default class PostEditor {
//-------------------------- //--------------------------
constructor() { constructor() {
this.processing = false; this.processing = false;
let self = "this"; let self = 'this';
this.admin = new FipamoAdminAPI(null, document.getElementById('notify-progress')); this.admin = new FipamoAdminAPI(null, document.getElementById('notify-progress'));
this.mm = new Maintenance(null, null, document.getElementById('notify-progress')); this.mm = new Maintenance(null, null, document.getElementById('notify-progress'));
this.urlPieces = document.URL.split('/'); this.urlPieces = document.URL.split('/');
@ -69,7 +69,7 @@ export default class PostEditor {
document.getElementById('post-image-upload').addEventListener( document.getElementById('post-image-upload').addEventListener(
'change', 'change',
e => { e => {
self.handleImageUpload(e.target.id, e.target.files); this.handleImageUpload(e.target.id, e.target.files);
}, },
false false
); );
@ -194,7 +194,7 @@ export default class PostEditor {
notify.alert(err, false); notify.alert(err, false);
}); });
}) })
.catch(() => { }); .catch(() => {});
} else { } else {
// Do nothing! // Do nothing!
} }

Loading…
Cancel
Save