j-FileBrowser
The component will open a file browser and returns selected 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.callback {Function(files, e)}a callback
Use it with <ui-component name="filebrowser">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.
<ui-component name="filebrowser"></ui-component>
<a href="javascript:fopen()">OPEN FILE</a>
<script>
function fopen() {
var opt = {};
opt.multiple = true;
// opt.accept = 'image/*';
opt.callback = function(files, e) {
console.log(files, e);
};
SETTER('filebrowser/show', opt);
}
</script>