Topic: Resize not working in UI Widget
Hi
I'm trying to resize the image but seems to not be working.
I'm using this configuration:
$(function() {
$('#uploader').plupload({
runtimes : 'html5,flash,html4',
browse_button : 'pickfiles',
container: 'contenedor',
max_file_size : '20mb',
url : 'receptor.asp',
resize : {width : aWidth, height : aHeight, quality : aQuality},
flash_swf_url : './js/Moxie.swf',
file_data_name: 'imagen',
chunk_size : '300kb',
unique_names:false,
filters : [
{title : "Image files", extensions : "jpg,jpeg"}
],
dragdrop: true,
views: {
list: true,
thumbs: true,
active: 'thumbs'
},
// Post init events, bound after the internal events
init : {
FilesAdded: function(up, files) {
// Called when files are added to queue
console.log("[FilesAdded]");
for (fileid in files) {
aSize += files[fileid].size;
console.log("El archivo es de %s, el total de %s", plupload.formatSize(files[fileid].size), plupload.formatSize(aSize));
}
},
UploadComplete: function(up, files) {
// Called when file has finished uploading
console.log("[UploadComplete]");
// backButtonState = true;
},
Error: function(up, error) {
// Called when error occurs
alert(error.message);
},
FilesRemoved: function(up, files) {
// Called when files are removed from queue
console.log("[FilesRemoved]");
for (fileid in files) {
aSize -= files[fileid].size
}
}
}
});
});
- I tried to hardcode the width and the height for avoid possible mistake.
- I tried to change quality.
- I tried with diferents size images.
The uploads went all ok but the size is the same of the original images.