Marce Castro
Marce Castro

Reputation: 35

Minimum Width/Height not working on jQuery File Upload plugin

According to this: https://github.com/blueimp/jQuery-File-Upload/wiki/API, I can restrict the minimum width/height for the images. I've tried as explained for the file "jquery.fileupload-fp.js":

$( '#fileupload' ).fileupload('process', {
// An array of image files that are to be resized:
files: files,
process: [
    {
        action: 'load',
        fileTypes: /^image\/(gif|jpeg|png)$/,
        maxFileSize: 20000000 // 20MB
    },
    {
        action: 'resize',
        maxWidth: 1920,
        maxHeight: 1200,
        minWidth: 800,
        minHeight: 600
    },
    {
        action: 'save'
    }

However, this is not working. Any ideas?

Thank you

Upvotes: 0

Views: 2522

Answers (1)

Connor Ross
Connor Ross

Reputation: 355

Taking a quick look at the documentation you linked to, it would appear that it actually re-sizes it. From that information it does not look like it will not restrict what is put in, just scale it to min and max.

Upvotes: 1

Related Questions