jalik / meteor-jalik-ufs

Upload File System for Meteor **DISCONTINUED**
MIT License
100 stars 29 forks source link

jalik_ufs_1.UploadFS.Uploader is not a function #107

Open mragwa opened 7 years ago

mragwa commented 7 years ago

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 commented 7 years ago

Have you imported the UploadFS object ?

import {UploadFS} from 'meteor/jalik:ufs';
mragwa commented 7 years ago

Yes I did

kubo0212monsterpixel commented 3 years ago

I have same issue, any news update here ?