Rank: Member
Groups: Member
Joined: 3/20/2006(UTC) Posts: 30
|
Is there a way, with the Java Uploader, to detect the size of the images before the person uploads? Specifically, we want people to always upload images that are 800x600 or larger, and if they are smaller, then pop-up a warning that says "Your images are smaller than the optimal size of 800x600" -- but not prevent them from uploading the smaller pics, if they really want to.
|
|
|
|
Rank: Advanced Member
Groups: Joined: 8/3/2003(UTC) Posts: 998
|
|
|
|
|
|
Rank: Member
Groups: Member
Joined: 3/20/2006(UTC) Posts: 30
|
I must be doing something wrong -- I'm running the following bit of Javascript after all images have been selected (we're forcing them to upload no more and no less than 5; this bit of code doesn't run until all five have been selected): Code:for(i = 1; i <= 5; i++)
{
vWidth = getImageUploader("ImageUploader").getUploadFileWidth(i);
if(vWidth < 800)
getSize = getSize + "Image: " + i + " " + vWidth + "\n";
}
alert(getSize);
It's correctly giving me the width for the first photo, but I'm getting 0 for all the others. What am I doing wrong? Sample output: Image: 1 512 Image: 2 0 Image: 3 0 Image: 4 0 Image: 5 0 Edited by user Tuesday, February 19, 2008 1:13:33 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Member
Groups: Member
Joined: 3/20/2006(UTC) Posts: 30
|
I'm really stumped with this -- I followed the instructions in your manual for UploadFileWidth Property; I can't even get the width property for any images past the first one, even if I do something simple like:
var vWidth = getImageUploader("ImageUploader").getUploadFileWidth(2);
They all come up as zero.
EDIT: Never mind -- it's suddenly working now. I don't know why, as I haven't made any changes to the code, but whatever.
|
|
|
|
Rank: Member
Groups: Member
Joined: 8/16/2006(UTC) Posts: 9
|
Hi
Can u please tell me what upload component you are using with Image Uploader4.0 |
|
|
|
|
Rank: Advanced Member
Groups: Joined: 8/3/2003(UTC) Posts: 998
|
Hello,
We have reproduced the bug. The problem occurred when all the thumbnails were small and EXIF thumbnails have been used. The fix will be available in the near release. |
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.