kartik-v / bootstrap-fileinput

An enhanced HTML 5 file input for Bootstrap 5.x/4.x./3.x with file preview, multiple selection, and more features.
http://plugins.krajee.com/file-input
Other
5.36k stars 2.4k forks source link

maxImageHeight, maxImageWidth not working. #1613

Closed ravensborn closed 3 years ago

ravensborn commented 4 years ago

Prerequisites

Steps to reproduce the issue

add maxImageWidth, maxImageHeight, minImageWidth, minImageHeight then try to upload an image with width and height larger than specified.

Expected behavior and actual behavior

I was expecting to see an error displayed when selecting a file larger than specified width and height instead I get nothing and the file normally passes validtion.

Environment

Browsers

Operating System

Libraries

Isolating the problem

My Code

$(document).ready(function () {
            $("#images").fileinput({
                showCaption: false,
                dropZoneEnabled: false,
                showUpload: false,
                showClose: false,
                showRemove: false,
                theme: 'fas',
                maxImageWidth: 3840,
                maxImageHeight: 2160,

                maxFileCount: 20,
                maxFileSize: {{env('CAR_IMG_UPLOAD_LIMIT')}},
                allowedFileTypes: ["image"],
                allowedFileExtensions: ["jpg", "jpeg", "png"],

                previewZoomButtonClasses: {
                    prev: 'd-none',
                    next: 'd-none',
                    toggleheader: 'btn btn-sm btn-kv btn-light',
                    fullscreen: 'btn btn-sm btn-kv btn-light',
                    borderless: 'btn btn-sm btn-kv btn-light',
                    close: 'btn btn-sm btn-kv btn-light'
                },
                layoutTemplates: {
                    actionZoom: '<button type="button" class="kv-file-zoom btn btn-light btn-sm" title="{zoomTitle}">{zoomIcon}</button>',
                }

            });
        });
OnnoRokomSoftwareLtd commented 4 years ago

Same here, resizeImage is not working.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

fabian-jg commented 2 years ago

This issue even occurs on the demo pages. https://plugins.krajee.com/file-image-dimensions-demo#max-image-dimensions