Overview of the File API interfaces

Before we start actually working with the examples and building code that works…with files, let's take a look at some of the important File API interfaces that…we're going to be working with.…The first interface is called a Blob, and a Blob is simply a contiguous amount…of raw data. Whether that data is text, an image, a bunch of PDF, some…Photoshop file, doesn't matter. It's just a certain amount of data that's in a…contiguous byte stream.…There are three properties here. There is the size property, which is the size…of the Blob in bytes. There's the type, which is the MIME type of the Blob, and…that's either text/plain, image/ png whatever the MIME type is.…

And then there is a slice function.…Now we'll work with slices later, but basically slice returns a new Blob object…of the given range of bytes, and optionally, you can specify a MIME type.…Now, you won't work with Blob interfaces directly. What you'll typically use is…the File interface which inherits from the Blob interface, and File actually…

Resume Transcript Auto-Scroll

Author

Released

12/2/2011

Join author Joe Marini as he demonstrates how to use the HTML5 File API to perform file-related operations from within a web page, including manipulating files, reading and accessing data within files, and retrieving information about files. The course also covers how to complete tasks that were previously only possible with native code, such as picture processing, file conversion, and content checking.