meteor-admin
meteor-admin copied to clipboard
can not upload attachment
I used meteor-starter project and in it I can not upload attachment of posts, as in the picture
+1, looks like quickform is broken?
in your posts.coffee file: https://github.com/yogiben/meteor-starter/blob/13efb700d9f8c417070234c54f868ab76fad8323/collections/posts.coffee
you need to add between line 27-28:
optional:true
just like how the updatedAt field has it on line 21
I changed my model to Articles rather than posts:
That does not help setting optional:true in the schema still does not work, nothing happens in the UI when i goto insert an image into article from /admin/Articles/new - image upload does not work from this template,
However, when I goto my custom /article/new template it works fine. Can you fix the admin tool to make image upload work please?
I can confirm it doesn't work with 1.2.0. It does work with 1.2.1 however which should be released today.
That's reassuring
It's already on atmosphere. You can check it out.
1.2.1 still fails out of the box for me.
2http-call-client.js:101 The provided value 'undefined' is not a valid enum value of interface XMLHttpRequestResponseType. fsFile-common.js:46 Uncaught Error: FS.File.attachData requires a data argument with some datafsFileAttachData @ fsFile-common.js:46FS.Collection.insert @ api.common.js:81Template.afFileUpload.events.change .js-file @ autoform-file.coffee:51(anonymous function) @ template.js:463Template._withTemplateInstanceFunc @ template.js:437(anonymous function) @ template.js:462(anonymous function) @ view.js:869Blaze._withCurrentView @ view.js:523(anonymous function) @ view.js:868(anonymous function) @ events.js:47jQuery.event.dispatch @ jquery.js:4665jQuery.event.add.elemData.handle @ jquery.js:4333
Even supplying my own template results in the same problem.. while that template works with upload by itself.
The problem seems to be do a missing subscription in the meteor starter app where i started this app from....
Meteor.subscribe('attachments') solved the problem for me.
Yep, also solved for me...
Router.waitOn ->
[
subs.subscribe 'user'
subs.subscribe 'attachments'
]
at router.coffee
Works in Chrome and Safari but still does not work in Firefox :-/