Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jalik_ufs_1.UploadFS.Uploader is not a function #107

Open
mragwa opened this issue Jan 24, 2017 · 3 comments
Open

jalik_ufs_1.UploadFS.Uploader is not a function #107

mragwa opened this issue Jan 24, 2017 · 3 comments

Comments

@mragwa
Copy link

mragwa commented Jan 24, 2017

Dears,
I'm new to Meteor development here.
I'm using it as a backend server to my Ionic2 application so i'm using Angular2+Meteor
and i'm trying to upload image to server
here the tutorial I follow:
https://angular-meteor.com/tutorials/socially/angular2/files-and-uploadfs

but i get an error
Exception while invoking method 'uploadImage' TypeError: jalik_ufs_1.UploadFS .Uploader is not a function
I declared the UploadFS on my declaration file and compiler reads it. but when i run upload function it doesn't work.
also when i console.log(UploadFS) it return an object :

I20170124-22:47:19.728(2)? { store: { GridFS: [Function], Local: [Function] },
I20170124-22:47:19.728(2)?   tokens:
I20170124-22:47:19.729(2)?    { _makeNewID: [Function],
I20170124-22:47:19.729(2)?      _transform: null,
I20170124-22:47:19.730(2)?      _connection:
I20170124-22:47:19.731(2)?       Server {
I20170124-22:47:19.731(2)?         options: [Object],
I20170124-22:47:19.731(2)?         onConnectionHook: [Object],
I20170124-22:47:19.732(2)?         publish_handlers: [Object],
I20170124-22:47:19.732(2)?         universal_publish_handlers: [Object],
I20170124-22:47:19.733(2)?         method_handlers: [Object],
I20170124-22:47:19.733(2)?         sessions: [Object],
I20170124-22:47:19.734(2)?         stream_server: [Object] },
I20170124-22:47:19.734(2)?      _collection:
I20170124-22:47:19.735(2)?       { find: [Function],
I20170124-22:47:19.735(2)?         findOne: [Function],
I20170124-22:47:19.736(2)?         insert: [Function],
I20170124-22:47:19.736(2)?         update: [Function],
I20170124-22:47:19.737(2)?         upsert: [Function: bound ],
I20170124-22:47:19.737(2)?         remove: [Function],
I20170124-22:47:19.737(2)?         _ensureIndex: [Function: bound ],
I20170124-22:47:19.738(2)?         _dropIndex: [Function: bound ],
I20170124-22:47:19.738(2)?         _createCappedCollection: [Function: bound ],
I20170124-22:47:19.738(2)?         dropCollection: [Function: bound ],
I20170124-22:47:19.739(2)?         rawCollection: [Function: bound ] },
I20170124-22:47:19.739(2)?      _name: 'ufsTokens',
I20170124-22:47:19.739(2)?      _driver: { mongo: [Object] },
I20170124-22:47:19.740(2)?      _restricted: false,
I20170124-22:47:19.740(2)?      _insecure: undefined,
I20170124-22:47:19.741(2)?      _validators:
I20170124-22:47:19.741(2)?       { insert: [Object],
I20170124-22:47:19.741(2)?         update: [Object],
I20170124-22:47:19.742(2)?         remove: [Object],
I20170124-22:47:19.742(2)?         upsert: [Object],
I20170124-22:47:19.742(2)?         fetch: [],
I20170124-22:47:19.743(2)?         fetchAllFields: false },
I20170124-22:47:19.743(2)?      _prefix: '/ufsTokens/',
I20170124-22:47:19.743(2)?      before:
I20170124-22:47:19.744(2)?       { insert: [Function],
I20170124-22:47:19.744(2)?         update: [Function],
I20170124-22:47:19.744(2)?         remove: [Function],
I20170124-22:47:19.744(2)?         upsert: [Function],
I20170124-22:47:19.745(2)?         find: [Function],
I20170124-22:47:19.745(2)?         findOne: [Function] },
I20170124-22:47:19.747(2)?       { insert: [Object],
I20170124-22:47:19.749(2)?         update: [Object],
I20170124-22:47:19.750(2)?         remove: [Object],
I20170124-22:47:19.750(2)?         upsert: [Object],
I20170124-22:47:19.751(2)?         find: [Object],
I20170124-22:47:19.751(2)?         findOne: [Object] },
I20170124-22:47:19.751(2)?      after:
I20170124-22:47:19.752(2)?       { insert: [Function],
I20170124-22:47:19.752(2)?         update: [Function],
I20170124-22:47:19.752(2)?         remove: [Function],
I20170124-22:47:19.752(2)?         upsert: [Function],
I20170124-22:47:19.752(2)?         find: [Function],
I20170124-22:47:19.753(2)?         findOne: [Function] },
I20170124-22:47:19.753(2)?      hookOptions: { before: [Object], after: [Object], all: [Object] },
I20170124-22:47:19.753(2)?      direct:
I20170124-22:47:19.753(2)?       { insert: [Function],
I20170124-22:47:19.754(2)?         update: [Function],
I20170124-22:47:19.754(2)?         remove: [Function],
I20170124-22:47:19.754(2)?         upsert: [Function],
I20170124-22:47:19.754(2)?         find: [Function],
I20170124-22:47:19.754(2)?         findOne: [Function] },
I20170124-22:47:19.755(2)?      upsert: [Function] },
I20170124-22:47:19.755(2)?   getStore: [Function: getStore],
I20170124-22:47:19.755(2)?   getStores: [Function: getStores],
I20170124-22:47:19.755(2)?   getTempFilePath: [Function: getTempFilePath],
I20170124-22:47:19.755(2)?   importFromURL: [Function: importFromURL],
I20170124-22:47:19.756(2)?   addMimeType: [Function],
I20170124-22:47:19.756(2)?   getMimeType: [Function],
I20170124-22:47:19.756(2)?   getMimeTypes: [Function],
I20170124-22:47:19.756(2)?   addPathAttributeToFiles: [Function],
I20170124-22:47:19.756(2)?   Config: [Function],
I20170124-22:47:19.757(2)?   config:
I20170124-22:47:19.757(2)?    { defaultStorePermissions: null,
I20170124-22:47:19.757(2)?      https: false,
I20170124-22:47:19.758(2)?      simulateReadDelay: 0,
I20170124-22:47:19.758(2)?      simulateUploadSpeed: 0,
I20170124-22:47:19.759(2)?      simulateWriteDelay: 0,
I20170124-22:47:19.759(2)?      storesPath: 'ufs',
I20170124-22:47:19.759(2)?      tmpDir: '/tmp/ufs',
I20170124-22:47:19.760(2)?      tmpDirPermissions: '0700' },
I20170124-22:47:19.760(2)?   Filter: [Function],
I20170124-22:47:19.760(2)?   StorePermissions: [Function],
I20170124-22:47:19.761(2)?   Store: [Function] }

If you can tell me any solution for this issue.
regards.

@jalik
Copy link
Owner

jalik commented Jan 24, 2017

Have you imported the UploadFS object ?

import {UploadFS} from 'meteor/jalik:ufs';

@mragwa
Copy link
Author

mragwa commented Jan 25, 2017

Yes I did

@kubo0212monsterpixel
Copy link

I have same issue, any news update here ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants