根据这个:https://github.com/blueimp/jQuery-File-Upload/wiki/API,我可以限制图像的最小宽度/高度。我已经按照文件“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'
}
但是,这是行不通的。有任何想法吗?
谢谢