application/x-www-form-urlencoded and multipart/form-data forms? | ActiveX/VBSScript registry editor
ActiveX NT User account manager
Export MDB/DBF from ASP
Url replacer, IIS url rewrite Active LogFile Email export ActiveX/ASP Scripting Dictionary object
| ||
| Article | |||
| Member of ScriptUtils |
Q: I am writing in reference to your Huge-ASP upload software product. I have seen in several places in the help file that this software can handle multipart/form-data encoded forms AND application/x-www-form-urlencoded forms. I don't see any example in the help files of an application/x-www-form-urlencoded form being processed. Please advise as to whether this is possible, and please provide an example. Thanks for your time and attention.
Huge-ASP upload can accept both application/x-www-form-urlencoded and multipart/form-data forms. You do not need to do some special settings to accept these two kinds of form. ScriptUtils.ASPForm component contains next simple code in ScriptUtils.ASPForm.Read method (in C++, of course):
Dim ContentType
ContentType = LCase(Request.ServerVariables("HTTP_CONTENT_TYPE"))
If Left(ContentType,19) = "multipart/form-data" Then
'Multipart source form
ProcessMultipartData
ElseIf ContentType = "application/x-www-form-urlencoded" Then
'URLEncoded source form
ProcessURLEncodedData
Else
'Unknown content-type
m_FormType = ftNone
End If There is a special property ScriptUtils.FormParser.FormType which gives you info what type of form is currently processed. You can use both <Form Action=hugeupload.asp method="POST"> <Input Name=Description> <Input Type=Submit> </Form>or
<Form Action=hugeupload.asp method="POST" ENCTYPE="multipart/form-data"> <Input Name=Description> <Input Type=Submit> </Form>
'Create form object
Dim Form
Set Form = Server.CreateObject("ScriptUtils.ASPForm")
Dim Description
Description = Form("Description")