vue-dropzone
vue-dropzone copied to clipboard
maxFilesize does not seem to work
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?
💋seid dabei
@santos2408 the correct param name is maxFileSizeInMB.