Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Meteor Cookbook
  • Toc
  • feedback
Meteor Cookbook

Meteor Cookbook

By : Isaac Strack
4.4 (5)
close
Meteor Cookbook

Meteor Cookbook

4.4 (5)
By: Isaac Strack

Overview of this book

This book is meant for developers of all experience levels looking to create mobile and full-stack web applications in JavaScript. Many of the simple recipes can easily be followed by less-experienced developers, while some of the advanced recipes will require extensive knowledge of existing web, mobile, and server technologies. Any application or enterprise web developer looking to create full-stack JavaScript-based apps will benefit from the recipes and concepts covered in this book.
Table of Contents (14 chapters)
close
13
Index

Using the HTML FileReader to upload images


Adding files via a web application is a pretty standard functionality nowadays. That doesn't mean that it's easy to do, programmatically. New browsers support Web APIs to make our job easier, and a lot of quality libraries/packages exist to help us navigate the file reading/uploading forests, but, being the coding lumberjacks that we are, we like to know how to roll our own! In this recipe, you will learn how to read and upload image files to a Meteor server.

Getting ready

We will be using a default project installation, with client, server, and both folders, and with the addition of a special folder for storing images. In a terminal window, navigate to where you would like your project to reside, and execute the following commands:

$ meteor create imageupload
$ cd imageupload
$ rm imageupload.*
$ mkdir client
$ mkdir server
$ mkdir both
$ mkdir .images

Note the dot in the .images folder. This is really important because we don't want the Meteor application...

bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete