How can I implement CollectionFS's isUploaded feature?
See original GitHub issueI’m trying to migrate from CollectionFS to Meteor-Files but is now stock at codes using isUploaded function.
The scenario is, the UI is rendered by a jade template, and it has code like this:
each attachments
.attachment-item
a.attachment-thumbnail.swipebox(href="{{url}}" title="{{name}}")
if isUploaded
if isImage
img.attachment-thumbnail-img(src="{{url}}")
else
span.attachment-thumbnail-ext= extension
else
+spinner
I tried to add a meta field called isUploaded and use a helper to return this.meta.isUploaded, but I found neither in the onUploaded function nor .on('end', callback) I can get the FileCursor object to update meta.isUploaded. When I call Attachments.findOne(fileObj._id) it always returns undefined.
Since the UI is jade templated it’s hard for me to do like “receive event, pass to another jade template, and update templated UI”. I’m not that familiar to meteor-jade templating, so I’d rather have a reactive variable (function?) solution.
So is there a way to simply implement CollectionFS’s isUploaded feature? Thank you!
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (8 by maintainers)

Top Related StackOverflow Question
@dr-dimitru Got it, I think I need to modify the interface since
__pre-colletionalso is not the solution. I’ll close this issue, thank you very much.Great! Seems like it’s what I want. Thank you very much.
dr.dimitru notifications@github.com 於 2019年11月25日 週一 下午10:22寫道:
– Romulus Urakagi Ts’ai