🐛 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:
Kevin Ansfield 2017-12-02 10:14:01 +01:00 committed by GitHub
parent eee49ef78c
commit d4444623d2

View File

@ -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();
},