+ manualSelectHandler() {
+ const input = elem('input', {
+ type: 'file',
+ style: 'left: -400px; visibility: hidden; position: fixed;',
+ accept: this.fileAcceptTypes,
+ multiple: this.allowMultiple ? '' : null,
+ });
+ this.container.append(input);
+ input.click();
+ input.addEventListener('change', () => {
+ for (const file of input.files) {
+ this.createUploadFromFile(file);
+ }
+ input.remove();
+ });
+ }
+
+ showOverlay() {
+ const overlay = this.dropTarget.querySelector('.dropzone-overlay');
+ if (!overlay) {
+ const zoneElem = elem('div', {class: 'dropzone-overlay'}, [this.zoneText]);
+ this.dropTarget.append(zoneElem);
+ }
+ }
+
+ hideOverlay() {
+ const overlay = this.dropTarget.querySelector('.dropzone-overlay');
+ if (overlay) {
+ overlay.remove();
+ }
+ }
+