Web Component: j-FileReader
j-FileReader
- 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
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
04. october 2023
Version
v1
License
https://www.totaljs.com/license/
Responsive
Yes
Author
Peter Širka
Email
petersirka@gmail.com
