yogiben / meteor-autoform-file

Upload and manage files with #autoForm
MIT License
92 stars 101 forks source link

Autosave doesn't trigger when in an array. #33

Open jimmiebtlr opened 9 years ago

jimmiebtlr commented 9 years ago

When using in an array like so

CollectionSchema = new SimpleSchema({
  images: {
    type: [String],
    optional: true
  },
  'images.$': {
    type: String,
    autoform: {
      type: "fileUpload",
      collection: "Images"
    }
  }
});

Auto save doesn't trigger when a file is added, or removed.

yogiben commented 9 years ago

For now you can hack with something like:

Template.profile.events
    'change form#updatePicture input': (e,t) ->
        Meteor.setTimeout ->
            $('form#updatePicture').submit()
        , 10