Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
πŸ› fix image upload for icons: reset input (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirrg001 authored and aileen committed Jun 20, 2017
1 parent 68ffa29 commit dfbbd53
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/settings/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ export default Controller.extend({
*/
imageUploaded(property, results) {
if (results[0]) {
// Note: We have to reset the file input after upload, otherwise you can't upload the same image again
// See https://github.com/thefrontside/emberx-file-input/blob/master/addon/components/x-file-input.js#L37
// See https://github.com/TryGhost/Ghost/issues/8545
$('.x-file--input').val('');
return this.get('model').set(property, results[0].url);
}
},
Expand Down

0 comments on commit dfbbd53

Please sign in to comment.