Giter VIP home page Giter VIP logo

Uncaught TypeError: Object #<Object> has no method 'userId' about meteor-collectionfs HOT 6 CLOSED

meteor-community-packages avatar meteor-community-packages commented on July 20, 2024
Uncaught TypeError: Object # has no method 'userId'

from meteor-collectionfs.

Comments (6)

raix avatar raix commented on July 20, 2024

Hi @Questful its related to #59 @aldeed has a solution for now - I'll have a look at the docs an remove the filter section from the master branch to reflect the atmosphere version.

I'm not sure about the userId I'll have to investigate - do you have a stacktrace / error message with line nr. etc - or a gist replication of the issue?

from meteor-collectionfs.

aldeed avatar aldeed commented on July 20, 2024

@raix, I bet this is from line 77 in common.js

https://github.com/raix/Meteor-CollectionFS/blob/9109464889ab017f280373c95aeff66e3efb115b/collectionFS_common.js

You're calling Meteor.userId() if this.userId isn't set, but in a case where none of the accounts packages have been added to the project, that method probably doesn't exist. Most people have accounts-base, so it's usually not an issue.

@Questful, quick fix would be to meteor add accounts-base, I think.

from meteor-collectionfs.

raix avatar raix commented on July 20, 2024

You are right @aldeed, it assumes that Accounts-base is installed - I'll fix it when swiping the code

from meteor-collectionfs.

Strosch avatar Strosch commented on July 20, 2024

@raix , @aldeed :
Thanks for your help guys ... adding accounts-base helped!
Won't use the filter method for now anyways! :)

from meteor-collectionfs.

Strosch avatar Strosch commented on July 20, 2024

So apparently I'm too stupid to implement a simple file list! :(
The upload works fine now but I can't list the file URLs.

My Handlebars code:
http://pastebin.com/K5aBk75Y

'yeah' shows up, so the filehandler itself works fine.
also {{filename}} shows the filenames so the files are found.
But the URLs or anything below {{filename}} does not do anything. What am I doing wrong? :(
I read both examples but still can't figure it out.

Or in other words: What is the best way to access the file URL of my files (in my case: images) so I can show the images in an img tag?

from meteor-collectionfs.

raix avatar raix commented on July 20, 2024

Nope @Questful, you are not stupid - @meteor have not added support for letting each iterate over objects yet... I've been running on a "fixed" branch on my meteor fork, I kinda forgot about it I assumed that it would be quickly fixed in meteor - guess I was wrong - could convert to an array in a helper or file an feature request for altering the collectionFS storage format. - For starters I'll put a note about it in the documentation, so we don't waste anybody elses time

meteor/meteor#918
meteor/meteor#912
meteor/meteor#1192
meteor/meteor#489

But its coming on the Meteor UI branch sometime think @dgreensp is going to speak a devshop 6 about the new UI (live in 6 hours)

I'm closing this issue

from meteor-collectionfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.