File Manager? - Postet den (8660 Views)
New Member
Desmomax
Innlegg: 55
55
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
<
   
 Sidestørrelse 
Postet den
Senior Member
weeweeslap
Innlegg: 1077
1077
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<
Postet den
Average Member
modifichicci
Innlegg: 787
787
Postet den
New Member
Desmomax
Innlegg: 55
55
thanks all..
grazie modifichicci wink<
Postet den
New Member
Desmomax
Innlegg: 55
55
I installed this mod. I can decide the maximun file size but i can not find where to set the maximun disk space allowed.
is it possible? i'd like to give a limited space where upload files for each user. many thanx
<
Postet den
Support Moderator
Shaggy
Innlegg: 6780
6780
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.”
Postet den
New Member
Desmomax
Innlegg: 55
55
unfortunally i cant do that..
i dont know so well asp
<
Postet den
Support Moderator
Shaggy
Innlegg: 6780
6780
Which mod are you using?
<
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.”
Postet den
Junior Member
PPSSWeb
Innlegg: 312
312
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:
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
'###############################################################################
<
Postet den
Junior Member
PPSSWeb
Innlegg: 312
312
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:
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
'###########################################################
<
Postet den
New Member
Desmomax
Innlegg: 55
55
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 <
Du må legge inn en melding