This sample demonstrates file handling in an extension.
On ChromeOS only, extensions can use the file_handlers
manifest key to
register as a file handler for particular file types. This behaves in a similar way to the
equivalent key in web
applications. As with web applications, you use the Launch Handler API to open and process a file.
This extension lets you open text files and see their name and size on the opened extension page. This could be a good starting point for building an extension that displays or interacts with an opened file.
This API is only supported on ChromeOS.
- Clone this repository.
- Load this directory in Chrome as an unpacked extension.
- Create a text file on your ChromeOS device.
- In the Files app, select the file.
- In the toolbar, choose "Open" and then "File Handling Demo".