File Uploader Part 7: Streaming Writes

In this episode we'll enhance our server side save method to support streaming writes

Good job! That's it for "File Uploader Part 7: Streaming Writes."

Need a second look? Watch again

File Uploader Part 7: Streaming Writes

In this episode we'll enhance our server side save method to support streaming writes. As data comes off the wire for the file, the save method will either create a new file or append to an existing one.

  • Meteor
  • Tutorial
**Related lessons:** * <a href="http://www.eventedmind.com/posts/meteor-build-a-file-upload-package" target="_blank">Build a File Upload Package</a> * <a href="http://www.eventedmind.com/posts/meteor-file-uploader-part-2-server-side-save" target="_blank">File Uploader Part 2: Server Side Save</a> * <a href="http://www.eventedmind.com/posts/meteor-file-uploader-part-3-using-packages-from-github" target="_blank">File Uploader Part 3: Using Packages from GitHub</a> * <a href="https://www.eventedmind.com/feed/meteor-file-uploader-part-4-publishing-packages-with-meteorite-and-atmosphere" target="_blank">File Uploader Part 4: Publishing Packages with Meteorite and Atmosphere</a> * <a href="http://www.eventedmind.com/posts/meteor-file-uploader-part-5-streaming-reads" target="_blank">File Uploader Part 5: Streaming Reads</a> * <a href="http://www.eventedmind.com/posts/meteor-file-uploader-part-6-streaming-uploads" target="_blank">File Uploader Part 6: Streaming Uploads</a> * <a href="https://www.eventedmind.com/feed/meteor-file-uploader-part-8-reactive-upload-progress" target="_blank">File Uploader Part 8: Reactive Upload Progress</a> <p class="code-block-title">meteor-file.js</p> ```javascript // client side javascript MeteorFile.upload(file, 'uploadFile', { size: 1024 * 1024 }, function (err) { if (err) throw err; else form.reset(); }); // meteor-file.js server fs.writeSync(fd, buffer, 0, buffer.length, this.start); ```
Join the Discussion

Want to leave a comment? .