Skip to content

maxFilesize does not seem to work #628

@santos2408

Description

@santos2408

Hello everyone, I need help with the component. I'm trying to limit the allowed image size for upload. I have already tried adding the "maxFilesize" property in the "options" section, and I have also tried directly adding the "max-file-size" property to the component, but nothing is working.

Regardless of the option I choose, the component always prevents adding images larger than 2MB.

component:

<dropzone 
        id="myVueDropzone" 
	ref="myVueDropzone" 
	:url="upload" 
	v-on:vdropzone-success="showSuccess"
	:max-number-of-files="maxFiles"
	:use-custom-dropzone-options="true"
	:dropzone-options="dropzoneOptions"
	:max-file-size="2">
	<input type="hidden" name="_token" v-model="token">
</dropzone>

options:

dropzoneOptions: {
	language: {
		dictDefaultMessage: '<div class="dz-icon icon-wrap icon-circle icon-wrap-md"><i class="fa fa-cloud-upload fa-3x"> 
                </i></div><div><p class="dz-text">Arraste as imagens aqui</p><p class="text-muted">ou click para selecionar 
                manualmente</p></div>',
		dictFileTooBig:'Arquivo muito grande. Maximo permitido: 2Mb'
	}
}

Does anyone know how to solve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions