Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
taokr  
#1 Posted : Wednesday, June 14, 2006 12:34:47 PM(UTC)
taokr

Rank: Member

Groups: Member
Joined: 11/15/2005(UTC)
Posts: 6

I was wondering if it's possible to set properties on the Image Uploader dynamically. What I mean is, can I have a button that when clicked, changes some of the properties, e.g. UploadThumbnail1FitMode.

My specific scenario is that by default my website resizes uploaded pictures on the server side to a maximum set of dimensions and several smaller thumbnails. However, on the upload page, there is a checkbox titled "Keep copies of the full-sized original images". When this is checked, the server also saves the original sized image in addition to the resized versions.

The way we've implemented it is that UploadThumbnail1FitMode is set to ActualSize and UploadThumbnail1JpegQuality is 100. The server then resizes Thumbnail1 into the appropriate sizes.

However, since users typically do NOT need to keep full-sized originals, it's a waste of bandwidth to send the actual sized image, particularly if the user has very big images. What I'd like to do is have Image Uploader resize the pic if the checkbox is not checked, and send the full-sized pic if it is checked.

The problem is, I think it's only possible to set properties like UploadThumbnail1FitMode once, at page load time. I don't see a way to dynamically set the property on an already-instantiated Image Uploader control.

Am I correct that this is not possible? And if so, any suggested workarounds?

Thanks,

Kevin

Fedor  
#2 Posted : Wednesday, June 14, 2006 10:11:16 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
You can invoke almost all Image Uploader properties in runtime. Please read Customizing Image Uploader section for general information.

For example if you use ActiveX or Java version with iumbed.js file then you can achieve your task the following way:

Code:
getImageUploader("ImageUploaderID").setUploadThumbnail1FitMode("Off");

If you use ActiveX version without iumbed.js then you do it this way:

Code:
document.getElementById("ImageUploaderID").UploadThumbnail1FitMode = "Off";

Edited by user Tuesday, October 28, 2008 6:18:03 AM(UTC)  | Reason: Not specified

Best regards,

Fedor Skvortsov

taokr  
#3 Posted : Thursday, June 15, 2006 4:30:01 AM(UTC)
taokr

Rank: Member

Groups: Member
Joined: 11/15/2005(UTC)
Posts: 6

Ah, fantastic! Thanks Fedor. I can't believe I missed that in the documentation.
Users browsing this topic
Guest
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.