Angular File Input
Simple angular js directive to handle the File Reader API.
Check the demo folder (demo/index.html) for examples.
Files to be used in production are located in the folder "angular-file-input/dist"
Including the required files (js and css)
The directive supports two parameters:
- mode: the file reader mode to be used;
- callback: a callback function with the file object
Available mode options:
- data-url: read file content as data url
- array-buffer: read file content as data buffer
- binary-string: read file content as a binary string
- text: read file content as text/plain
If you do not provide a mode, it will assume "data-url" as default.
The File object response
The file object used in the callback function will have the following properties:
- encoding (only available in "data-url" mode)
Angular File Input is licensed under MIT License.