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

When my file size is greater than a certain value, only resize, how to set up, thanks #910

Closed
298029lkk opened this issue Mar 29, 2017 · 3 comments

Comments

@298029lkk
Copy link

No description provided.

@298029lkk
Copy link
Author

298029lkk commented Mar 29, 2017

.on("filebatchselected", function (event, files) {
if (files[0].size < 1024 * 1000) {
$(this).fileinput({
resizeImage: false,
});
$(this).fileinput("upload");
} else {
$(this).fileinput({
resizeImage: true,
});
}
}).on('fileimageresized', function (event, previewId, index) {
$(this).fileinput("upload");
})


Is there any advice?

@kartik-v
Copy link
Owner

kartik-v commented Apr 4, 2017

New property resizeIfMoreThan added. Set this value in KB and the plugin will automatically skip the resizing of these image files less than this size value.

Check the image resize (conditional) demo for understanding.

@298029lkk
Copy link
Author

cool! thank you!

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

No branches or pull requests

2 participants