The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
Hallo !
I am looking for a MOD that allow user to menage their files uploaded in posts (delete, use again in other posts..) and allow me to give a kb limit of files uploaded. At moment the only way is to check the directory named for each user
Can someone suggest me a Mod ?
many thanx
<
I am looking for a MOD that allow user to menage their files uploaded in posts (delete, use again in other posts..) and allow me to give a kb limit of files uploaded. At moment the only way is to check the directory named for each user
Can someone suggest me a Mod ?
many thanx
<
Posted
http://www.snitzbitz.com/mods/default.asp?pg=4&SortBy=Name&SortDir=asc&Version=All
couple file stuff there, file library might be the one you want<
couple file stuff there, file library might be the one you want<
Posted
Proeder file attach mod, on snitzbitz.<
Posted
As far as I know, none of the attachment or file manager files include such a feature; you would need to edit your files to include a check on the size of the folder before processing the upload.
<
Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
<
Search is your friend
“I was having a mildly paranoid day, mostly due to thefact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Posted
If you are using Proeder's as suggested above you can modify the code in outputFile.asp to limit by folder size by adding the following:
around line#161 after the endif and before 'Create and Write to a File insert:
around line#224 between the Response.Write and the Else insert:
Then add the constant maxDiskSpace to your config.asp file in the variable section:
<
around line#161 after the endif and before 'Create and Write to a File insert:
Code:
'##################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
'#############################################################################################around line#224 between the Response.Write and the Else insert:
Code:
'#########close limit for maxDiskSpace#####
End If
set ds=nothing
'##########################################Then add the constant maxDiskSpace to your config.asp file in the variable section:
Code:
'###################Define Maximum Disk Space for uploads Per User##############
Const maxDiskSpace = 1048576
'###############################################################################
Last edited by PPSSWeb on 13 February 2007, 14:41
Posted
You might also want to let the users know how much disk space they have used of their quota in the myfiles page.
Insert at line#222 the following:
<
Insert at line#222 the following:
Code:
'#################display current disk usage################
Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject")
Dim ds
Set ds=ScriptObject.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
'###########################################################
Last edited by PPSSWeb on 13 February 2007, 15:27
Posted
great!!!! many thanks!!
unfortunally i can not find the line where insert your code. My outputfile.asp is totally different... i have the lcamara's mod of proeder mod (with fixes from modifichicchi and others). Here is mine outputfile, could you please give it a look and tell me where insert your code? many thanx
Download Outputfile.rar <
unfortunally i can not find the line where insert your code. My outputfile.asp is totally different... i have the lcamara's mod of proeder mod (with fixes from modifichicchi and others). Here is mine outputfile, could you please give it a look and tell me where insert your code? many thanx
Download Outputfile.rar <
Last edited by Desmomax on 14 February 2007, 03:14
Email Member
Message Member
Post Moderation
FileUpload
If you're having problems uploading, try choosing a smaller image.
Preview post
Send Topic
Loading...