<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.getRequestFieldFilename.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.getRequestFieldFilename</api:function-name><api:suggest>xdmp.getrequestfieldfilename</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>getrequestfieldfilename</api:suggest><api:function-link mode="xquery" fullname="xdmp:get-request-field-filename">/apidoc/8.0/xdmp:get-request-field-filename.xml</api:function-link><api:function mode="javascript" name="getRequestFieldFilename" type="builtin" lib="xdmp" category="AppServerBuiltins" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.getRequestFieldFilename"><api:summary>
  Returns a list of filenames from a multipart request for the field name
  specified. Returns an empty sequence for a field that does not exist.
</api:summary><api:params><api:param name="field-name" type="xs:string"><api:param-description>
    The name of the request field with the multipart request.
  </api:param-description><api:param-name>field-name</api:param-name><api:param-type>String</api:param-type></api:param></api:params><api:return>ValueIterator</api:return><api:usage>
  This function is useful for file upload applications.  For an example, see
  the  
  <a href="./xdmp.getRequestField#grf2js" class="javascript" xmlns="http://www.w3.org/1999/xhtml">second example 
  in the <code>xdmp.getRequestField</code></a> documentation.
</api:usage><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
//   Returns the filename of the files loaded in the
//   "upload" input form element.

xdmp.getRequestFieldFilename("upload")
=&gt; "myfile.doc"
</pre></api:example></api:function></api:function-page>