Author |
Topic |
|
help
New Member
70 Posts |
Posted - 08 November 2004 : 18:22:58
|
oh! im fused up with those mods, whats this?
ok, error in attachment error:
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/ziadrahbani/outputFile.asp, line 44
Invalid ProgID. For additional information specific to this message please visit the Microsoft Online Support site located at: http://www.microsoft.com/contentredirect.asp.
AND THIS IS
outputfile.asp page:
<!--#include file="upload.asp"--> <!--#INCLUDE FILE="config.asp" --> <%
subfolder = "uploaded" iconimage = "images/icon_paperclip.gif"
Response.Expires=0 Response.Buffer = TRUE Response.Clear byteCount = Request.TotalBytes RequestBin = Request.BinaryRead(byteCount) Dim UploadRequest Set UploadRequest = CreateObject("Scripting.Dictionary") BuildUploadRequest RequestBin membername = UploadRequest.Item("memberName").Item("Value") subfolder = subfolder & "/" & membername contentType = UploadRequest.Item("blob").Item("ContentType") filepathname = UploadRequest.Item("blob").Item("FileName") filename = Right(filepathname,Len(filepathname)-InstrRev(filepathname,"\")) oldfilename = filename filename = Year(Now) & Month(Now) & Day(Now) & Hour(Now) & Minute(Now) & Second(Now) & "_" & filename ' --- CHECK FILE FOR ACCEPTABILITY --- if oldfilename = "" then response.redirect "pop_upload_new.asp" else extension = LCase(Mid(filename,InStrRev(filename,"."))) end if
select case extension case ".jpg", ".jpeg", ".gif", ".zip", ".doc" allowFile=true case else allowFile=false end select
If allowFile and byteCount <= 80000 Then value = UploadRequest.Item("blob").Item("Value")
'Create FileSytemObject Component Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject") memberPath = (Server.MapPath("uploaded") & "\" & membername) If not ScriptObject.FolderExists(memberPath) then ScriptObject.createFolder(memberPath) end if
'Create and Write to a File pathEnd = Len(Server.mappath(Request.ServerVariables("PATH_INFO")))-14 Set MyFile = ScriptObject.CreateTextFile(Left(Server.mappath(Request.ServerVariables("PATH_INFO")),pathEnd) & SUBFOLDER & "\" & filename) For i = 1 to LenB(value) MyFile.Write chr(AscB(MidB(value,i,1))) Next MyFile.Close If byteCount < 1000 Then strFileSize = Round(byteCount,2) & " Bytes" ElseIf strFileSize < 1000000 Then strFileSize = Round(byteCount/1000,2) & " KB" Else strFileSize = Round(byteCount/1000000,2) & " MB" End If
Response.Write "<html>" & vbNewline Response.Write "<head>" & vbNewline Response.Write "<title>Upload File Result is Good</title>" & vbNewline %> <script> //window.opener.PostTopic.Message.value=window.opener.PostTopic.Message.value + "\n\nImage Insert:
<% =strFileSize %>"; window.opener.PostTopic.Message.value=window.opener.PostTopic.Message.value + "\n\nDownload Attachment: [url=\"<% =strForumURL %><% =SUBFOLDER %>/<% =filename %>\"] <% =oldfilename %>[/url] <% =strFileSize %>"; </script> <% Response.Write "</head>" & vbNewline Response.Write "<body bgColor=""" & strHeadCellColor & """ text=""" & strDefaultFontColor & """ link=""" & strLinkColor & """ aLink=""" & strActiveLinkColor & """ vLink=""" & strActiveLinkColor & """ onUnLoad=""window.opener.focus();"">" & vbNewline Response.Write "<p align=""center"">" & vbNewline Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strHeadFontSize & """ color=""" & strHeadFontColor & """>The following file has been successfully recieved</font></ br><hr size=""1"" color=""" & strHiLiteFontColor & """>" & vbNewline Response.Write " <table>" & vbNewline Response.Write " <tr><td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b> Filename </b></font></td><td> <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>" & oldfilename & "</font> </td></tr>" & vbNewline Response.Write " <tr><td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b> Extension </b></font></td><td> <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>" & extension & "</font> </td></tr>" & vbNewline Response.Write " <tr><td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b> Size </b></font></td><td> <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>" & strFileSize & "</font> </td></tr>" & vbNewline Response.Write " <tr><td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b> Link </b></font></td><td> <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>" & subfolder & "/" & filename & "</font> </td></tr>" & vbNewline Response.Write " </table><hr size=""1"" color=""" & strHiLiteFontColor & """>" & vbNewline Response.Write "<a href=""#"" onClick=""window.close();"">Please click here to close this window.</a>" & vbNewline Response.Write "</p>" & vbNewline Response.Write "</body>" & vbNewline Response.Write "</html>" & vbNewline Else
Response.Write "<html>" & vbNewline Response.Write "<head>" & vbNewline Response.Write "<title>Upload File Has Errors</title>" & vbNewline Response.Write "</head>" & vbNewline Response.Write "<body bgColor=""" & strHeadCellColor & """ text=""" & strDefaultFontColor & """ link=""" & strLinkColor & """ aLink=""" & strActiveLinkColor & """ vLink=""" & strActiveLinkColor & """>" & vbNewline Response.Write "<p align=""center"">" & vbNewline Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strHeadFontSize & """ color=""" & strHeadFontColor & """>There is a problem with the file you are attempting to upload.</font></ br><hr size=""1"" color=""" & strHiLiteFontColor & """>" & vbNewline Response.Write " <table>" & vbNewline Response.Write " <tr><td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b> Filename </b></font></td><td> <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>" & oldfilename & "</font> </td><td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>File names must use only valid characters</font></td></tr>" & vbNewline Response.Write " <tr><td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b> Extension </b></font></td><td> <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>" & extension & "</font> </td><td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>Certain file extensions are not accepted</font></td></tr>" & vbNewline Response.Write " <tr><td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b> Size </b></font></td><td> <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """>" & Round(byteCount/1000,2) & " KB</font> </td><td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>File sizes must be reasonable</font></td></tr>" & vbNewline Response.Write " </table><hr size=""1"" color=""" & strHiLiteFontColor & """>" & vbNewline Response.Write " <a href=""#"" onClick=""history.go(-1);"">Please click here to close go back and try again.</a>" & vbNewline Response.Write "</p>" & vbNewline Response.Write "</body>" & vbNewline Response.Write "</html>" & vbNewline End If %>
HELP HELP HELP! its becoming boring! no mod had worked succesfully of my forum!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
help
New Member
70 Posts |
Posted - 08 November 2004 : 18:25:46
|
how also to configure to the users to use uploading, its not showing in the posting page??????? |
|
|
OneWayMule
Dev. Team Member & Support Moderator
Austria
4969 Posts |
|
laser
Advanced Member
Australia
3859 Posts |
Posted - 08 November 2004 : 20:59:18
|
Spot on OWM, because 1asphost doesn't support FSO. |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 08 November 2004 : 22:46:16
|
where did you find this code? I don't recall posting this anywhere, but I can clearly tell it has portions of my code in it. just curious... |
|
|
|
|
Topic |
|
|
|