Skip to content
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.

文件大小为0会触发文件类型不匹配 #2274

Open
AnkerCheng opened this issue Mar 1, 2017 · 4 comments
Open

文件大小为0会触发文件类型不匹配 #2274

AnkerCheng opened this issue Mar 1, 2017 · 4 comments

Comments

@AnkerCheng
Copy link

AnkerCheng commented Mar 1, 2017

当上传一个空白文件(size=0)的时候, 会触发Q_TYPE_DENIED,即文件类型不匹配不合理:

        // 判断文件是否可以被加入队列
        acceptFile: function( file ) {
            var invalid = !file || !file.size || this.accept &&
                    rExt.exec( file.name ) && !this.accept.test( file.name );
            return !invalid;
        },

应该去掉 !file.size 这个条件

@13661172102
Copy link

顶一个,的确不合理

@qichangjun
Copy link

+1

@heihei001
Copy link

感谢楼主,我找半天没找到在哪里判断的,这确实不合理,0KB文件也是有意义的文件。

@Dewyzee
Copy link

Dewyzee commented Sep 5, 2017

+1,空文件为什么作为type检查错误返回

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants