vue-dropzone icon indicating copy to clipboard operation
vue-dropzone copied to clipboard

maxFilesize does not seem to work

Open santos2408 opened this issue 2 years ago • 3 comments
trafficstars

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?

santos2408 avatar Jun 26 '23 17:06 santos2408

💋seid dabei

DJKStyles avatar Jul 19 '23 21:07 DJKStyles

@santos2408 the correct param name is maxFileSizeInMB.

danielverissimo avatar Sep 01 '23 18:09 danielverissimo