mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Fixed uploading of images for staff users
This commit is contained in:
parent
51fd4ffedb
commit
62009832fe
1 changed files with 8 additions and 4 deletions
|
@ -30,7 +30,7 @@ export default Component.extend({
|
||||||
text: '',
|
text: '',
|
||||||
altText: '',
|
altText: '',
|
||||||
saveButton: true,
|
saveButton: true,
|
||||||
accept: null,
|
accept: '',
|
||||||
extensions: null,
|
extensions: null,
|
||||||
uploadUrl: null,
|
uploadUrl: null,
|
||||||
validate: null,
|
validate: null,
|
||||||
|
@ -85,9 +85,8 @@ export default Component.extend({
|
||||||
return htmlSafe(`width: ${width}`);
|
return htmlSafe(`width: ${width}`);
|
||||||
}),
|
}),
|
||||||
|
|
||||||
didReceiveAttrs() {
|
init() {
|
||||||
let image = this.get('image');
|
this._super(...arguments);
|
||||||
this.set('url', image);
|
|
||||||
|
|
||||||
if (!this.get('accept')) {
|
if (!this.get('accept')) {
|
||||||
this.set('accept', this.get('_defaultAccept'));
|
this.set('accept', this.get('_defaultAccept'));
|
||||||
|
@ -100,6 +99,11 @@ export default Component.extend({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
didReceiveAttrs() {
|
||||||
|
let image = this.get('image');
|
||||||
|
this.set('url', image);
|
||||||
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
fileSelected(fileList, resetInput) {
|
fileSelected(fileList, resetInput) {
|
||||||
// can't use array destructuring here as FileList is not a strict
|
// can't use array destructuring here as FileList is not a strict
|
||||||
|
|
Loading…
Add table
Reference in a new issue