Forums
This topic is locked
Pure ASP Upload 2.0.9
Posted 22 Aug 2003 04:09:03
1
has voted
22 Aug 2003 04:09:03 Isaac Weathers posted:
I have added the asp upload behavior to my form and when I try to upload a file it just refreshes the page.I have made sure that my form and insert statements work independently of pure asp upload. And it works great. But when I add the behavior it stops working.
Does anyone have any ideas???
Thanks for any help!
Replies
Replied 22 Aug 2003 15:34:42
22 Aug 2003 15:34:42 Patrick Woldberg replied:
can you send me the code to
--------------------------------------------------
Patrick Woldberg
Web Developer at Dynamic Zones
Manager at DMXzone.com
--------------------------------------------------
--------------------------------------------------
Patrick Woldberg
Web Developer at Dynamic Zones
Manager at DMXzone.com
--------------------------------------------------
Replied 25 Aug 2003 20:44:40
25 Aug 2003 20:44:40 Isaac Weathers replied:
<!--#include file="../ScriptLibrary/incPureUpload.asp" -->
<%
'*** Pure ASP File Upload -----------------------------------------------------
' Copyright (c) 2001-2002 George Petrov, www.UDzone.com
' Process the upload
' Version: 2.0.9
'------------------------------------------------------------------------------
'*** File Upload to: """itAttachments""", Extensions: "", Form: form1, Redirect: "", "file", "", "uniq", "true", "", "" , "", "", "", "", "600", "", "", ""
Dim GP_redirectPage, RequestBin, UploadQueryString, GP_uploadAction, UploadRequest
PureUploadSetup
If (CStr(Request.QueryString("GP_upload"


on error resume next
Dim reqPureUploadVersion, foundPureUploadVersion
reqPureUploadVersion = 2.09
foundPureUploadVersion = getPureUploadVersion()
if err or reqPureUploadVersion > foundPureUploadVersion then
Response.Write "<b>You don't have latest version of ScriptLibrary/incPureUpload.asp uploaded on the server.</b><br>"
Response.Write "This library is required for the current page. It is fully backwards compatible so old pages will work as well.<br>"
Response.End
end if
on error goto 0
GP_redirectPage = ""
Server.ScriptTimeout = 600
RequestBin = Request.BinaryRead(Request.TotalBytes)
Set UploadRequest = CreateObject("Scripting.Dictionary"

BuildUploadRequest RequestBin, """itAttachments""", "file", "", "uniq"
If (GP_redirectPage <> "" and not (CStr(UploadFormRequest("MM_insert"



If (InStr(1, GP_redirectPage, "?", vbTextCompare) = 0 And UploadQueryString <> ""

GP_redirectPage = GP_redirectPage & "?" & UploadQueryString
End If
Response.Redirect(GP_redirectPage)
end if
else
if UploadQueryString <> "" then
UploadQueryString = UploadQueryString & "&GP_upload=true"
else
UploadQueryString = "GP_upload=true"
end if
end if
' End Pure Upload
'------------------------------------------------------------------------------
%>