Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions addon/components/file-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ export default Component.extend({
},

addPreviewImage: function(file) {
// called by readFile callback, so we could have been destroyed
if (this.isDestroyed || this.isDestroying) {
return;
}

var image = this.$(
'<img src="' + file.data + '" class="file-picker__preview__image ' +
(this.get('multiple') ? 'multiple' : 'single') + '">');
Expand All @@ -132,6 +137,10 @@ export default Component.extend({
},

updateProgress: function(event) {
// called by readFile callback, so we could have been destroyed
if (this.isDestroyed || this.isDestroying) {
return;
}
const {
loaded,
total
Expand Down