我正在实现 Blueimp jQuery File Uploader https://github.com/blueimp/jQuery-File-Upload并且我想在添加第一张图像后更改previewMaxWidth和previewMaxHeight。这是因为我有一个产品特征图像,然后是产品的后续视图,每个视图都应显示小于特征图像。
这是我的文件上传调用:
$('.imageupload').fileupload({
autoUpload : true,
acceptFileTypes : /(\.|\/)(gif|jpe?g|png)$/i,
previewMaxWidth : 198,
previewMaxHeight : 800,
uploadTemplateId : 'product-add-image-upload',
downloadTemplateId : 'product-add-image-download'
}).bind('fileuploadadded', function(e, data) {
// change preview width/height to 60px/60px after first image loaded
// not sure what to put here
});