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

Notification

Icon
Error

Options
Go to last post Go to first unread
dayyanj  
#1 Posted : Saturday, January 12, 2008 11:19:04 PM(UTC)
dayyanj

Rank: Newbie

Groups: Member
Joined: 1/12/2008(UTC)
Posts: 2

I've noticed a small issue, and although there are many work-arounds, I think it may need to be looked into.

I have a site, where users can upload up to 3 images, if they have already uploaded x number of images, I limit the number they can upload to the remaining number of images they can upload.

I.e. A user uploads 2 images to their story, the next day they want to add more images.
I check how many images the story has already (in this case 2) and set MaxFileCount to 3 - 2 and output this to HTML

iu.addParam("MaxFileCount", "1");

NOW. If the user already has 3 images on their story the code generates:
iu.addParam("MaxFileCount", "0"); which by rights should mean - No Images Can Be Uploaded.

Granted there are many ways to disable uploads if the max count has already been exceeded, but I think this is an issue.

DayyanWhistle
Fedor  
#2 Posted : Sunday, January 13, 2008 2:31:31 AM(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)
Hello Dayyan,

It works according MaxFileCount documentation:

Quote:
A non-negative integer value that specifies maximum file count allowed for upload per one session. If the value is 0 then there is no limit.


So way in your code you should handle zero value manually and disable upload in this case.

Thus it is not bug, it is feature :)

Edited by user Sunday, January 13, 2008 2:32:30 AM(UTC)  | Reason: Not specified

Best regards,
Fedor Skvortsov
dayyanj  
#3 Posted : Sunday, January 20, 2008 5:53:15 PM(UTC)
dayyanj

Rank: Newbie

Groups: Member
Joined: 1/12/2008(UTC)
Posts: 2

Fair enough :)

Cheers for the response.

D
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.