Skip to content

Commit 823bb12

Browse files
authored
Merge pull request #54 from VeliovGroup/issue37
fix #37 by cleaning unintended insertConfig atts on hidden input
2 parents 5b79351 + f65678c commit 823bb12

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lib/client/fileUpload.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template name="afFileUpload">
2-
<input value="{{fileId}}" type="hidden" {{this.atts}}>
2+
<input value="{{fileId}}" type="hidden" {{inputAtts this}}>
33
{{#with uploadedFile}}
44
{{#if previewTemplate}}
55
{{>Template.dynamic template=previewTemplate}}

lib/client/fileUpload.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ Template.afFileUpload.helpers({
111111
},
112112
accept() {
113113
return Template.instance().accept;
114+
},
115+
inputAtts(formContext) {
116+
const { atts } = formContext;
117+
if (!atts) return;
118+
delete atts.insertConfig;
119+
return atts;
114120
}
115121
});
116122

0 commit comments

Comments
 (0)