title: How does GridFS work within Meteor?
body: <p>I'm working on an application where an admin can upload a schedule (just a file), and an user can download that uploaded file. It is working now with an upload function within Meteor and the decoded file is saved to the Mongo DB. </p>
  
  <p>The problem is that I can only upload files that are around 16mb. I did some research and apparently you can fix this with GridFS. I'm very new to this and the documentation doesn't seem to help at all. Can someone give me a simple example of how to use GridFS to solve my issue? Or does anyone recommend any other solutions?</p>
  
  <p>This is my UploadSchedule method that I use for uploading the file to the server:</p>
  
  <pre><code>uploadSchedule() {
      if (this.fileListNextMonth == null) {
        this.alertController.create(
          {
            title: "Error",
            subTitle: "Cannot upload file!",
            buttons: ['Ok']
          }
        ).present();
      } else {
        this.fileName = this.fileList[0].name;
  
        this.getBase64(this.fileList[0]).then(
          data =&gt;
            this.scheduleProvider.uploadSchedule(data, this.fileName, true).then(observable =&gt; {
              const subscription = observable.subscribe(data =&gt; {
                console.log("data: " + data);
              }, err =&gt; console.error(err), () =&gt; subscription.unsubscribe());
            })
        );
      }
    }
  </code></pre>
  
  <p>In my ScheduleProvider there is a method (uploadSchedule) that does a post request to the server with the specific file. In the backend I simply do an Insert with the file that has been uploaded, so it wil be saved to the database as a string. </p>
  
  <p>Hopefully someone can help me out.</p>
  
  <p>Thanks!</p>