Specifying additional request parameters |
![]() ![]() ![]() |
In certain cases you may wish to submit additional information with your file upload. This can be accomplished by defining additional HTTP request parameters to be submitted with the HTTP request when uploaded files to your server using HTTP File Upload Applet. There are two methods that you may specify additional request parameters.
HTTP POST request parameters
The first method is to specify additional request parameters using the requestParams applet parameter. The value of this parameter contains a set of name/value pairs delimited by commas. The name value pair is formatted as name=value with the name of the variable being on the left side of the equals sign and the value of the variable being on the right side of the equals sign. These parameters will be included as part of the HTTP message body. Multiple parameters may be specified using a comma as a name/value pair delimiter.
Example
<param name="requestParams" value="fname=john,lname=smith"/>
In the above example the HTTP request parameters fname and lname will be submitted to the specified url parameter with values of john and smith respectively.
HTTP GET request parameters
The second method is to append request parameters to the url parameter using url-encoded name/value pairs. This data will NOT be included in the body of the HTTP request. Per HTTP specifications you are limited to a maximum of 4K of parameter data when using request parameters in this form.
Example
<param name="url" value="http://www.mydomain.com/upload.php?fname=john&lname=smith"/>
In the above example the HTTP request parameters fname and lname will be submitted to the specified url parameter with values of john and smith respectively. Notice that the first parameter is delimited using a ? symbol with additional parameters delimited using an & symbol.
See also