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

How to upload to store on another meteor server? #88

Open
vacarsu opened this issue Sep 22, 2016 · 1 comment
Open

How to upload to store on another meteor server? #88

vacarsu opened this issue Sep 22, 2016 · 1 comment

Comments

@vacarsu
Copy link

vacarsu commented Sep 22, 2016

I have two meteor servers and I'm connecting. One for the desktop app with all the collections, and the other for the mobile app. I'm connecting the mobile app to the desktop app via ddp.connect(). How can I upload files to the store on the meteor server hosting the desktop app and database? If I try I get Store not found [invalid-store]. If I define the store on the server of the mobile app it tries to send a post request to http://localhost:3000/ufs/appimages/ which should be http://localhost:3030 where the database is located.

Here is my collection on the mobile server
imports/collections/app-images.ts
    import { Meteor } from 'meteor/meteor';
    import { Mongo } from 'meteor/mongo';
    import { UploadFS } from 'meteor/jalik:ufs';
    import { CloudServer } from './../cloud-connection';

    export const AppImages = new Mongo.Collection('appimages', {
      connection: CloudServer
    });

    export const AppImagesStore = new UploadFS.store.GridFS({
      collection: AppImages,
      name: 'appimages',
      filter: new UploadFS.Filter({
        contentTypes: ['image/*']
      })
    });
@andypopa
Copy link

andypopa commented Oct 9, 2016

In my case, I forgot to add this import in /server/main.js

import '../imports/api/images';

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

2 participants