我正在使用dropzonejs / react-dropzone,我想取一个文件夹并将其拖入。它应该将文件提取出来,但在 FF 中,file.type 为空白,因此所有文件都被拒绝。
我有基本设置
常量配置 = this.componentConfig; 常量 djsConfig = this.djsConfig; const eventHandlers = { init: dz => this.dropzone = dz, addedfile: this.handleFileAdded.bind(this), 发送: this.sending.bind(this), processing: this.processing.bind(this), maxfilesexceeded: this.maxfilesexceeded.bind(this), maxfilesreached: this.maxfilesreached.bind(this), 成功: this.success.bind(this) }
this.djsConfig = {
addRemoveLinks: true,
acceptedFiles: "image/jpeg,image/png,image/gif"
autoProcessQueue: true,
maxFiles: 500
};
this.componentConfig = {
iconFiletypes: ['.jpg', '.png', '.gif'],
showFiletypeIcon: true,
postUrl: ''
};
this.dropzone = null;
<DropzoneComponent config={config} eventHandlers={eventHandlers} djsConfig={djsConfig}>