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

Notification

Icon
Error

Options
Go to last post Go to first unread
ukwebsites  
#1 Posted : Friday, April 19, 2013 5:38:54 AM(UTC)
ukwebsites

Rank: Newbie

Groups: Member
Joined: 3/25/2009(UTC)
Posts: 5

I am trying to change restrictions after the applet has been initialized, but even though the properties are updated (which I can see if I read the value back out) they are not being used.

Specifically I am trying to change the MaxFileCount (as if a user decides to do something they are allowed to upload more or less files).

Initially set as:

Code:
    restrictions: {
        maxFileCount: 4
    },


Then later changed to:

Code:
$au.uploader('Uploader1').restrictions.maxFileCount = 2;


Reading the value returns 2, although the uploader still allows 4 images to be selected. I was previously using version 6 which allowed this, has this functionality been removed on version 8?

vitaly  
#2 Posted : Sunday, April 21, 2013 9:53:31 PM(UTC)
vitaly

Rank: Advanced Member

Groups:
Joined: 12/19/2012(UTC)
Posts: 164

Was thanked: 8 time(s) in 8 post(s)
Hello ukwebsites,

You should get/set the value with Upload Suite 8 at runtime like this:
Code:

$au.uploader('uploaderID').restrictions().maxFileCount(value);
value = $au.uploader('uploaderID').restrictions().maxFileCount();

You can read more about it here: http://www.aurigma.com/docs/us8/JA_P_J_$au_restrictions_maxFileCount.htm
Best regards,
Vitaly Kustov
Aurigma Technical Support
ukwebsites  
#3 Posted : Monday, April 22, 2013 4:05:30 AM(UTC)
ukwebsites

Rank: Newbie

Groups: Member
Joined: 3/25/2009(UTC)
Posts: 5

Thank you, that has done it.

However, it also brings up another question - since different user actions on the page change the amount of images they can upload, how can I set the uploader limit to zero/no files, as a "0" value is classified as unlimited?
vitaly  
#4 Posted : Monday, April 22, 2013 10:10:32 PM(UTC)
vitaly

Rank: Advanced Member

Groups:
Joined: 12/19/2012(UTC)
Posts: 164

Was thanked: 8 time(s) in 8 post(s)
Hello ukwebsites,

You can not set limit to "zero/no files" with the Upload Suite 8. Perhaps, you should change your application logic because there is no reason to use Upload Suite if you need to set maxFileCount limit to "no files".

Edited by user Monday, April 22, 2013 10:11:50 PM(UTC)  | Reason: Not specified

Best regards,
Vitaly Kustov
Aurigma Technical Support
ukwebsites  
#5 Posted : Tuesday, April 23, 2013 2:12:31 AM(UTC)
ukwebsites

Rank: Newbie

Groups: Member
Joined: 3/25/2009(UTC)
Posts: 5


Thank you for your reply, seems a little odd that this feature was taken out on later versions (as it worked on v. 6).

Another problem this creates is that every time the maxFileCount is changed it clears the current selection, is there a way to stop this from happening?
Tanya  
#6 Posted : Thursday, April 25, 2013 2:18:05 AM(UTC)
Tanya

Rank: Advanced Member

Groups: Member
Joined: 5/14/2007(UTC)
Posts: 24

Was thanked: 1 time(s) in 1 post(s)
Hi ukwebsites,

The selection is cleared because the Uploader applies new restriction and updates panes to meet it.
Best regards,
Tatyana Bertyakova

UserPostedImage Follow Aurigma on Twitter!
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.