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

Notification

Icon
Error

Options
Go to last post Go to first unread
jhemps  
#1 Posted : Thursday, September 30, 2010 3:05:06 AM(UTC)
jhemps

Rank: Newbie

Groups: Member
Joined: 8/19/2010(UTC)
Posts: 3

Hi,
Is it possible to disable uploads, but keep the ImageUploaderFlash in view? I've tried setting the maxFileCount to zero, but this doesn't display the tooManyFilesError when they try to upload more files.

I want to stop the user from uploading once they've reached the maximum 10 photos, but keep the flash component in view so that if they delete a photo i can just re-enable the uploading.

Thanks,
John
Dmitry.Obukhov  
#2 Posted : Thursday, September 30, 2010 5:36:42 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello John,

Thanks for posting your question.

According to the documentation, MaxFileCount property sets a maximum number of files allowed for upload per one session. If the value is 0 then there is no limit. Therefore, it did not work as you needed.
I recommend you to go the following way to disable upload. You can use BeforeUpload event, where return false if limit of uploaded files exceeds:
Code:

function before() {
            var filecount = COUNT;
            //COUNT - amount of already uploaded files on server
            if (filecount >= 10) {
                alert("Limit exceeded. Please delete your files.");
                return false;
            }
        }

If you have any additional questions or problems, please feel free to let me know.

Edited by user Thursday, September 30, 2010 8:06:39 PM(UTC)  | Reason: Not specified

Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
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.