I can't make the image resize client side working with JQuery File Upload...
The file is correctly saved on the server, but the plugin does not do any File size check, Extension check, nor do resize the image prior to uploading.
What am I doing wrong?
I added those script on my page:
<script src="js/vendor/jquery.ui.widget.js"></script>
<script src="js/jquery.iframe-transport.js"></script>
<script src="js/jquery.fileupload.js"></script>
<script src="js/jquery.fileupload-fp.js"></script>
And this is the code that I'm using to bind Jquery file upload plugin:
<script>
$(function () {
$('#fileupload').fileupload({
maxNumberOfFiles: 1,
replaceFileInput: false,
dataType: 'json',
url: '<%= ResolveUrl("AjaxFileHandler.ashx") %>',
done: function (e, data) {
},
process: [
{
action: 'load',
fileTypes: /^image\/(gif|jpeg|png)$/,
maxFileSize: 20000 // 20MB
},
{
action: 'resize',
maxWidth: 1920,
maxHeight: 1200,
minWidth: 800,
minHeight: 600
},
{
action: 'save'
}
]
});
});
</script>