Loading TOC...

MarkLogic 12 EA 2 Product Documentation
xdmp:get-request-field-filename

xdmp:get-request-field-filename(
   $field-name as xs:string
) as xs:string*

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.

Parameters
field-name The name of the request field with the multipart request.

Usage Notes

This function is useful for file upload applications. For an example, see the second example in the xdmp:get-request-field documentation.

Example

(:
   Returns the filename of the files loaded in the
   "upload" input form element.
:)
xdmp:get-request-field-filename("upload")
=> "myfile.doc"

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.