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

Control maxFilesize after resized images #2260

Open
chuchiperriman opened this issue Sep 28, 2023 · 2 comments
Open

Control maxFilesize after resized images #2260

chuchiperriman opened this issue Sep 28, 2023 · 2 comments

Comments

@chuchiperriman
Copy link

When you configure maxFilesize (1Mb) and resize images (150x150), he original image size can be 5Mb but 50kb when it has been resized.

Dropzone doesn't not permit select an image greater than 1Mb even though the resized image is smaller (50kb)

IMHO, dropzone should check the image size after the image has been resized

@thasleemmji
Copy link

@chuchiperriman Do you have any sort of update on this? Did you find a solution for the same?

@chuchiperriman
Copy link
Author

We have an internal control by now. If it's configured to resize then we disable the maxFilesize parameter and we check it in the server.

// Si hay redimensionamiento no controlamos el máximo porque puede que
// seleccionen una foto de 10 megas pero al redimensionar sean 2. Si tenemos
// el límite en 3, da error, ni siquiera redimensionaría
if (props.resizeWidth || props.resizeHeight) {
    maxFilesize = null;
}

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

2 participants