Web Component: j-FileReader
j-FileReader
- jComponent
v19|v20
- singleton
- easy usage
- only for text files
Methods:
component.open(opt)
- opens file browseropt.multiple
{Boolean}
enables multiple files (default:false
)opt.accept
{String}
allows only specified content-type (default:undefined
)opt.base64
{Boolean}
reads a file in Base64 encoding (default:false
)- NEW:
opt.files
{HTTP Files}
reads files e.g. from Drag & Drop opt.callback
{Function(file)}
a callback- NEW:
opt.progress
{Function(percentage, file)}
optional
var opt = {};
opt.accept = 'text/*';
// opt.files = e.files;
opt.callback = function(file) {
console.log(file);
};
SETTER('filereader/open', opt);
Author
- Peter Širka petersirka@gmail.com
- License
Created
27. february 2017
Updated
23. april 2024
jComponent library
19 | 20
Version
v1
License
https://www.totaljs.com/license/
Responsive
Yes
Author
Peter Širka
Email
petersirka@gmail.com