Aurigma Forums
»
Upload Suite
»
Discussions – ActiveX/Java Uploader
»
Uploader 8.0.33 - Ignoring restrictions made after initialize
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?
|
|
|
|
Rank: Advanced Member
Groups: Member
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
|
|
|
|
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?
|
|
|
|
Rank: Advanced Member
Groups: Member
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
|
|
|
|
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?
|
|
|
|
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. |
|
|
|
|
Aurigma Forums
»
Upload Suite
»
Discussions – ActiveX/Java Uploader
»
Uploader 8.0.33 - Ignoring restrictions made after initialize
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.