I am working on a mod to provide upload quota's per user for Proeder's attachment mod. If I didn't forget anything the following should allow you to set a quota. Here goes...
In <b>Config.asp</b> look for "Dim strUploadUrl, strAllowAttachment". After that line insert the following:
const maxDiskSpace = <font color="red"><Integer value for maximum upload in bytes></font id="red"> 'Define Maximum Disk Space for uploads Per User
In <b>myfiles.asp</b> look for "if FSO.FolderExists(Path) then" approx line #227. After that line insert the following:
'#################display current disk usage################
Dim ds
Set ds = FSO.GetFolder(Path)
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize-2 & """><b>Current Disk Usage = " & Round(ds.Size/1048576,2) & " MB"
IF AdminAllowed=false then
Response.Write " of "& maxDiskSpace/1048576 & " MB</b></font></p><p>"
Else
Response.Write "</b></font></p><p>"
End IF
set ds=nothing
'###########################################################
Approximately line 252 find the associated "else" After that line insert the following:
'#################display current disk usage################
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize-2 & """><b>Current Disk Usage = 0 MB"
IF AdminAllowed=false then
Response.Write " of "& maxDiskSpace/1048576 & " MB</b></font></p><p>"
Else
Response.Write "</b></font></p><p>"
End IF
'###########################################################
In <b>ouputFile.asp</b> look for "Create and Write to a File" approx line #162. Before that line insert:
'##################limit uploads directory size to less than maxDiskSpace#####################
Dim ds
Set ds=ScriptObject.GetFolder(memberPath)
IF ds.Size + bytecount > maxDiskSpace then
Response.Write "<html>" & vbNewline
Response.Write "<head>" & vbNewline
Response.Write "<title>Error while uploading</title>" & vbNewline
Response.Write "</head>" & vbNewline
Response.Write "<body link=""" & strLinkColor & """ aLink=""" & strActiveLinkColor & """ vLink=""" & strActiveLinkColor & """>" & vbNewline
Response.Write "<p align=""center"">" & vbNewline
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strHeadFontSize & """ color=""" & strDefaultFontColor & """><b><br>This file cannot be uploaded.<br><br></b></font></ br><hr size=""1"" color=""" & strHiLiteFontColor & """>" & vbNewline
Response.Write " <table>" & vbNewline
Response.Write " <tr><td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """><b> Maximum Disk Space </b></font></td><td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>- Maximum upload disk space of " & maxDiskSpace/1048576 & " MB exceeded. " & vbNewLine & "Current Disk Usage = " & Round(ds.Size/1048576,2) & " MB</font></td></tr>" & vbNewline
Response.Write " </table><hr size=""1"" color=""" & strHiLiteFontColor & """>" & vbNewline
Response.Write " <p align=""center""><a href=""#"" onClick=""history.go(-1);"" style=""text-decoration: none""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>Please click here to go back and choose another file to upload.</font></a></p>" & vbNewline
Response.Write "</p>" & vbNewline
Response.Write "</body>" & vbNewline
Response.Write "</html>" & vbNewline
Else
'#############################################################################################
Approximately line #224 locate the "Else". Just before it insert:
'#########close limit for maxDiskSpace#####
End If
set ds=nothing
'##########################################
<font size="1">Thanks go to Desmomax who provided the idea for the mod in the first place. </font id="size1">