Loading TOC...

xdmp.getRequestFieldContentType

xdmp.getRequestFieldContentType(
   $field-name as String
) as ValueIterator

Summary

This function is used to extract the content type from the request field. It returns a sequence of content types, one for each filename, in the same order as the filenames returned from xdmp:get-request-field-filename.

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.getRequestField documentation.

Example

//   Returns the content type of the files loaded in the
//   "upload" input form element.

xdmp.getRequestFieldContentType("upload");
=> "application/msword"

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy