MultiPartFormEncoding (HttpRequest property): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 1: Line 1:
<span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span>
{{Template:HTTPRequest:MultiPartFormEncoding subtitle}}
[[Category:HTTPRequest methods|MultiPartFormEncoding property]]


This property sets and returns a <var>[[Enumerations#Using Boolean enumerations|Boolean]]</var> enumeration
This property sets and returns a <var>[[Enumerations#Using Boolean enumerations|Boolean]]</var> enumeration
Line 13: Line 12:
that uses enctype="multipart/form-data" and a type="file" input field.
that uses enctype="multipart/form-data" and a type="file" input field.
==Syntax==
==Syntax==
<p class="syntax">%curr = %httpreq:MultiPartFormEncoding
{{Template:HTTPRequest:MultiPartFormEncoding syntax}}
 
%httpreq:MultiPartFormEncoding = newvalue
</p>
 
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
Line 48: Line 43:
<li>For information about Enumerations, see [[Enumerations|"Enumerations"]].
<li>For information about Enumerations, see [[Enumerations|"Enumerations"]].
</ul>
</ul>
==See also==
{{Template:HTTPRequest:MultiPartFormEncoding footer}}

Revision as of 18:25, 15 June 2011

Template:HTTPRequest:MultiPartFormEncoding subtitle

This property sets and returns a Boolean enumeration (True or False) that indicates whether Multipart Form encoding support is on or off. If on (True), an HTTPRequest object can send file data to a web site from either a Longstring or a Stringlist.

The Post of file data using this encoding support emulates an HTML form that uses enctype="multipart/form-data" and a type="file" input field.

Syntax

Template:HTTPRequest:MultiPartFormEncoding syntax

Syntax terms

%curr The value (True or False) of %httpreq's MultiPartFormEncoding property.
%httpreq A previously defined and instantiated HTTPRequest object.
newvalue The Boolean enumeration value (True or False) to assign to %httpreq's MultiPartFormEncoding property.

Usage notes

  • To enable file-based form uploads:
    1. Set MultiPartFormEncoding to True.
    2. Add form data to the HTTP request with the AddField method.
    3. Use the Post function to send the request.
  • MultiPartFormEncoding must be set to True before any AddField statements are issued, or the request is cancelled.
  • For an example of code that uses the MultiPartFormEncoding property, see this AddField example.
  • For information about Enumerations, see "Enumerations".

See also

Template:HTTPRequest:MultiPartFormEncoding footer