aldeed / meteor-cfs-autoform

Upload files using CollectionFS as part of AutoForm submission
MIT License
37 stars 32 forks source link

cfs-files (the multi version) does not work #43

Open genyded opened 9 years ago

genyded commented 9 years ago

There are 2 issue with cfs-files (the "multi" version)...

1) When file or files are selected, submit fails with "must be a string" error 2) When changing files, the previous one or ones are not cleared

ofqwx commented 9 years ago

I have the exactly same Issue

tothand commented 9 years ago

I had the same issue and I've managed to find a workaround. Instead of using afQuickField assign an afFieldInput to the correspoding array in the schema.

The schema part

  fileList: {
    type: [String],
    optional: true,
  }

The template

    {{> afFieldInput name="fileList" type="cfs-files" collection="files"}}

I'm still testing it so please test this before using it! It seems to be working for me but your mileage may vary!

As for the second issue (changing the files not clearing the previous ones) I haven't found any solutions yet.