Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maxFilesize does not seem to work #628

Open
santos2408 opened this issue Jun 26, 2023 · 3 comments
Open

maxFilesize does not seem to work #628

santos2408 opened this issue Jun 26, 2023 · 3 comments

Comments

@santos2408
Copy link

santos2408 commented Jun 26, 2023

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 santos2408 changed the title maxFilesize does not seem to work from :options in component maxFilesize does not seem to work Jun 26, 2023
@DJKStyles
Copy link

💋seid dabei

@danielverissimo
Copy link

@santos2408 the correct param name is maxFileSizeInMB.

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

No branches or pull requests

4 participants
@danielverissimo @santos2408 @DJKStyles and others