Closed chongwang87 closed 9 years ago
Hi Tomi, Thanks for such a wonderful package.
I had an issue regarding the reactive formData, i wish to have just one uploader and user are allow to upload their images to different places by changing the select. Is there anyway the formData capture the reactive value from the select?
select
here are my code Template
<select id="uploadFolder"> <option value="avatar">Avatar</option> <option value="banner">Banner</option> <option value="Photo">Photo</option> </select>
Template Events
'change #uploadFolder': function (e,t) { Template.instance().uploadFolder.set($(e.target).val()); }
Template Helpers
myFormData: function(){ return { dir: 'user/' + this.user.profile.username + '/images/' + Template.instance().uploadFolder.get() }; }
Template onCreated
this.uploadFolder = new ReactiveVar('avatar');
Great!
tomi:upload-jquery v2.2.0 now working with Session and Template.instance() on formData callback
tomi:upload-jquery v2.2.0
Hi Tomi, Thanks for such a wonderful package.
I had an issue regarding the reactive formData, i wish to have just one uploader and user are allow to upload their images to different places by changing the
select
. Is there anyway the formData capture the reactive value from the select?here are my code Template
Template Events
Template Helpers
Template onCreated