I am using FilePicker.IO with Meteor. I have it set up and working, but I have fun into an issue using multiple widgets on a page.
I have a table with rows of data. The data set is a bunch of users with name, photo, address, etc.
I'd like to include a "upload photo" button on EACH row, but since the widget is rendered by ID, I am limited to one per page. Wondering if there is a solution where I can have an upload widget on each row of the table.
Here is my code in my coffee file:
filepicker.setKey('askdjw&H*(Djkjew)') #Not my key
Template.admin.rendered = () ->
filepicker.constructWidget $('#uploadPhoto')
HTML:
<td><input type="filepicker-dragdrop" id="uploadPhoto" class="{{_id}}"/></td>
A couple of things :
{{_id}}
is a unique id it should be in the id attribute$('.uploadPhoto')
instead?You can see a similar pattern here in my
datatables
implementation