Skip to content

Commit ffe0799

Browse files
authored
Merge pull request #48 from pfmziota/master
Fix #47 by deleting instance.data.value on remove click
2 parents 32b604e + f56e9ab commit ffe0799

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/client/fileUpload.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ Template.afFileUpload.events({
105105
'click [data-remove-file]'(e, template) {
106106
e.preventDefault();
107107
template.fileId.set(false);
108+
if (template.data.value) {
109+
delete template.data.value;
110+
}
108111
try {
109112
this.remove();
110113
} catch (error) {

package.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Package.describe({
22
name: 'ostrio:autoform-files',
33
summary: 'File upload for AutoForm using ostrio:files',
44
description: 'File upload for AutoForm using ostrio:files',
5-
version: '2.1.3',
5+
version: '2.1.4',
66
git: 'https://github.com/VeliovGroup/meteor-autoform-file.git'
77
});
88

0 commit comments

Comments
 (0)