i checked the Docs but couldn't find anything .. is there a way to validate image dimensions of a file before uploading? I want to add a rule for minimum image dimensions and display an error message in case the image is too small.
Asked
Active
Viewed 152 times
1 Answers
0
Ok i could find it out by myself:
Put this inside the FilesAdded
function:
plupload.each(files, function(file, i)
{
var img = new mOxie.Image;
img.onload = function () {
var wi = this.width;
var he = this.height;
// you can validate here
};
img.load(file.getSource());
});

Fuxi
- 7,611
- 25
- 93
- 139