Build a File Upload Package

We can use our knowledge of EJSON and packages to begin building a binary file uploader that uses DDP to upload files

Good job! That's it for "Build a File Upload Package."

Need a second look? Watch again

Build a File Upload Package

We can use our knowledge of EJSON and packages to begin building a binary file uploader that uses DDP to upload files. After a few episodes of improvements, we'll open source the package.

  • Meteor
  • Tutorial
**Related lessons:** * <a href="http://www.eventedmind.com/posts/meteor-create-a-custom-ejson-type" target="_blank">Create a Custom EJSON Type</a> * <a href="https://www.eventedmind.com/feed/meteor-introducing-the-file-api" target="_blank">Introducing the File API</a> * <a href="http://www.eventedmind.com/posts/meteor-introducing-the-package-system" target="_blank">Introducing the Package System</a> * <a href="https://www.eventedmind.com/feed/meteor-file-uploader-part-2-server-side-save" target="_blank">File Uploader Part 2: Server Side Save</a> <p class="code-block-title">app.js</p> ```javascript MeteorFile.read(file, function (err, meteorFile) { // Make a Meteor method call passing a meteorFile Meteor.call("uploadFile", meteorFile, function (err) { if (err) throw err; else form.reset(); }); }); ```
Join the Discussion

Want to leave a comment? .