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

Notification

Icon
Error

Options
Go to last post Go to first unread
aarongibsos  
#1 Posted : Monday, May 11, 2009 5:04:28 AM(UTC)
aarongibsos

Rank: Newbie

Groups: Member
Joined: 5/11/2009(UTC)
Posts: 7

I have been able to implement the solution to change appearance of images that do not match the filtering criteria as described on http://www.aurigma.com/S...izingAppearance.htm.aspx using the UpdateItemAppearance function there. This example works very well, thank you. However now I'm wondering if it is possible to do nearly the same thing but instead of changing the paneItemDesign of the item, to just remove or hide the item altogether?

In terms of the example shown - if my UpdateItemAppearance() is fired by one of the listeners and I am looping through all of the paneItems in my FolderPane and I check it using getPaneItemCanBeUploaded(), could I do something like this:

Code:

        if (imageUploader.getPaneItemCanBeUploaded(i) == false) {
                // is there a function that will do this??
                imageUploader.removePaneItem("FolderPane", i); 
            
        }


I have been searching through the API to try and discover a function like this but I have so far been unable to find it. Is there a quick and easy way to do this that I'm just not seeing? Please advise.

thanks!

Edited by user Monday, May 11, 2009 5:06:14 AM(UTC)  | Reason: Not specified

Dmitry  
#2 Posted : Monday, May 11, 2009 4:18:12 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

If you need to filter items in the folder pane you need to set up restrictions rules. Please, read the Configuring Restriction Rules for Files section for details.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
aarongibsos  
#3 Posted : Wednesday, May 13, 2009 2:06:30 AM(UTC)
aarongibsos

Rank: Newbie

Groups: Member
Joined: 5/11/2009(UTC)
Posts: 7

I understand this and I am already filtering images on the client side using code from the page you posted, i.e.

Code:

.......
			//Configure File Settings
			iu.addParam("FileMask", "*.bmp;*.jpg;*.jpeg;*.JPG;*.png;*.gif");
			iu.addParam("MaxFileCount", "1");		

			iu.addParam("MinImageWidth", "200");
			iu.addParam("MinImageHeight", "200");
			iu.addParam("MessageDimensionsAreTooSmallText", "Images must be larger than [MinImageWidth]x[MinImageHeight].");		
.............


My issue is that the images that fail this filtering rule (images that are smaller than 200x200) still show up in the upload pane even though they are filtered out. The only way you know they have failed the filter is that they don't have a checkbox and you can't select them. With these filter rules in place I was able to implement a function to add some visual cues to the images that are too small based on code in the docs:

Code:

function aur_UpdateItemAppearance() {
    var imageUploader = getImageUploader("ImageUploader1");  
    var cnt = imageUploader.getPaneItemCount("FolderPane");
    for (var i = 1; i <= cnt; i++) {
        if (imageUploader.getPaneItemCanBeUploaded(i) == false) {
            imageUploader.setPaneItemDesign("FolderPane", i, "ForegroundColor=red;" +
            "ForegroundOpacity=30;BorderLineStyleLeft=Dot;BorderLineStyleRight=Dot;" +
            "BorderLineStyleTop=Dot;BorderLineStyleBottom=Dot;BorderLineColorLeft=red;" +
            "BorderLineColorRight=red;BorderLineColorTop=red;BorderLineColorBottom=red");            
        }
    }
}


This works fairly well except that in my tests the images it marks in red are inconsistent, if you load Aurigma multiple times on the same set of images (desktop) it will highlight different images every time, including some that are not within the filter restriction.

So I'm wondering if instead of doing this I can just remove from the list images that are too small / fail filtering requirements? From what I understand I cannot use imageUploader.UploadFileRemove(i); to do this because that just removes the file from the upload list and what I need to do is remove it from the FolderPane. How would I do this?
Dmitry  
#4 Posted : Wednesday, May 13, 2009 5:02:54 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

aarongibsos wrote:
So I'm wondering if instead of doing this I can just remove from the list images that are too small / fail filtering requirements? From what I understand I cannot use imageUploader.UploadFileRemove(i); to do this because that just removes the file from the upload list and what I need to do is remove it from the FolderPane.

I understand what you mean. Unfortunately this feature is not supported in the current version of Image Uploader. It will be added not earlier than in version 7. Could you describe in detail on what parameters would you like to filter files dynamically (I mean filename, filesize, image width/height and so on)? We will have to expose getting of these parameters via Image Uploader API, so your requirements will be taken into account while implementing custom dynamic filtering.

aarongibsos wrote:
This works fairly well except that in my tests the images it marks in red are inconsistent, if you load Aurigma multiple times on the same set of images (desktop) it will highlight different images every time, including some that are not within the filter restriction.

We were able to reproduce this problem in Image Uploader Java, it is a bug and will be fixed in one of the nearest 6.x releases right after 6.0. Thanks for the report.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
aarongibsos  
#5 Posted : Thursday, May 14, 2009 4:57:24 AM(UTC)
aarongibsos

Rank: Newbie

Groups: Member
Joined: 5/11/2009(UTC)
Posts: 7

Dmitry wrote:
Could you describe in detail on what parameters would you like to filter files dynamically (I mean filename, filesize, image width/height and so on)? We will have to expose getting of these parameters via Image Uploader API, so your requirements will be taken into account while implementing custom dynamic filtering.

In my opinion you guys have already implemented the filtering rules well, and my wish list for dynamic filtration would be the same stuff that you have already done. The only change I'd like to see is an option where any thumbnails that don't have the selection checkbox attached (meaning they've failed filtering) should just go away.

I don't know how hard this would be to implement in your codebase but I wonder if the solution could be as easy as exposing an additional property like:
Code:
iu.addParam("ShowFilesThatFailedFilter", "false");

If set to false, maybe the same logic that goes through all the thumbnails in the upload pane to add / remove checkboxes could instead remove any images that would otherwise not have a checkbox?

Dmitry wrote:
We were able to reproduce this problem in Image Uploader Java, it is a bug and will be fixed in one of the nearest 6.x releases right after 6.0.

Sounds good. Would you happen to have an ETA for these releases, 6.0 and/or 6.x? my boss is asking me when we can get this fixed and I don't exactly know what to tell him...
Dmitry  
#6 Posted : Friday, May 15, 2009 3:59:43 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Thanks for your reply, I have put your requirements to our "wish" list.

aarongibsos wrote:
Sounds good. Would you happen to have an ETA for these releases, 6.0 and/or 6.x? my boss is asking me when we can get this fixed and I don't exactly know what to tell him..

The update will be avaialble in 1-1.5 months.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
aarongibsos  
#7 Posted : Tuesday, May 19, 2009 6:00:16 AM(UTC)
aarongibsos

Rank: Newbie

Groups: Member
Joined: 5/11/2009(UTC)
Posts: 7

perfect! thank you for your consideration.
Users browsing this topic
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.