yogiben / meteor-autoform-file

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

How to use in Meteor 1.3? #109

Open thearabbit opened 8 years ago

thearabbit commented 8 years ago

How to use in Meteor 1.3? Could example?

thearabbit commented 8 years ago

I create Files, Pub, Security via doc in global variable. I can upload photo in the form, but I can not get url to view photo in <img>

// imports/ui/pages
showTmpl.helpers({
    data () {
        let data = Item.findOne(this._id);
        data.photoUrl = null;
        if (data.photo) {
            data.photoUrl = Files.findOne(data.photo).url();
        }

        return data;
    }
});

// Show
undefined