mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 20:34:02 +03:00
🐛 Fixed editor image uploads (#919)
closes https://github.com/TryGhost/Ghost/issues/9300
- as of d33cfdac30
we reset the file input earlier in the actions chain, this was clearing the file references before the editor was triggering the upload. By converting the `FileList` to an `Array` before resetting the input we keep hold of the file references and the upload works again.
This commit is contained in:
parent
eee49ef78c
commit
d4444623d2
@ -156,7 +156,10 @@ export default Component.extend({
|
||||
},
|
||||
|
||||
uploadImages(fileList, resetInput) {
|
||||
this.set('droppedFiles', fileList);
|
||||
// convert FileList to an array so that resetting the input doesn't
|
||||
// clear the file references before upload actions can be triggered
|
||||
let files = Array.from(fileList);
|
||||
this.set('droppedFiles', files);
|
||||
resetInput();
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user