react-files-uploading
Version:
The simple files uploader applied Render Props pattern. This approach allows you to fully control UI component and behaviours.
15 lines (14 loc) • 551 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAcceptTypeString = exports.openFileDialog = void 0;
var openFileDialog = function (inputRef) {
if (inputRef.current)
inputRef.current.click();
};
exports.openFileDialog = openFileDialog;
var getAcceptTypeString = function (acceptType) {
return acceptType && acceptType.length > 0
? acceptType.map(function (item) { return ".".concat(item); }).join(', ')
: '*/*';
};
exports.getAcceptTypeString = getAcceptTypeString;