HI!
im currently trying to do a form that upload to a database some information and a file.
the part referent of putting the information in the DB was easy but now when i try to add the code referent to the upload of the file it says:
"Cannot use the generic Request collection after calling BinaryRead."
this is the code that i have:
if (Request.ServerVariables("REQUEST_METHOD") = "POST") then
if (request("Browse")="") then
Set upload = Server.CreateObject( "w3.upload" )
Set fileName= upload.Form( "browse" )
if fileName.IsFile then
fileName.SaveToFile( Request.ServerVariables( "APPL_PHYSICAL_PATH" ) & "\\" & fileName )
end if
end if
criarNoticia Request("data"), Request("browse"), Request("titulo"), Request("destaque"), Request("corpo")
Response.Redirect "indice.asp"
end if
im currently trying to do a form that upload to a database some information and a file.
the part referent of putting the information in the DB was easy but now when i try to add the code referent to the upload of the file it says:
"Cannot use the generic Request collection after calling BinaryRead."
this is the code that i have:
if (Request.ServerVariables("REQUEST_METHOD") = "POST") then
if (request("Browse")="") then
Set upload = Server.CreateObject( "w3.upload" )
Set fileName= upload.Form( "browse" )
if fileName.IsFile then
fileName.SaveToFile( Request.ServerVariables( "APPL_PHYSICAL_PATH" ) & "\\" & fileName )
end if
end if
criarNoticia Request("data"), Request("browse"), Request("titulo"), Request("destaque"), Request("corpo")
Response.Redirect "indice.asp"
end if