Skip to content

Dropzone uses maxFilesize as KiB instead of MiB #602

@QuingKhaos

Description

@QuingKhaos

It seems

if (file.size / 1024 > that.options.maxFilesize || file.xhr.status === 413) {
divides the file size only one time by 1024, so it's compared as KiB against the maxFilesize instead of MiB which maxFilesize is supposed to be.

The error is only emitted, when the server errors too, e.g. upload_max_filesize of php is too small. Otherwise the maxFilesize is not checked or not checked as 256 KiB (?). If the file is really over 256 MiB the dropzone errors immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions