file
element is the element storing the result of the file upload. The result can be stored in two ways:xs:anyURI
.xs:base64Binary
. Base64 is a mechanism to encode any binary data using a 65-character subset of US-ASCII. Using this mechanism allows embedding binary data into XML documents, at the typical cost of taking 50% more space than the original binary data. For more information, please refer to the RFC.xf:filename
, xf:mediatype
, and xxf:size
(the latter is an Orbeon Forms extension) allow storing metadata about an uploaded file:xf:filename
: stores the file name sent by the user agentxf:mediatype
: store the media type sent by the user agentxxf:size
: stores the actual size in bytes of the uploaded dataxs:anyURI
contains metadata parameters and typically looks like this:<xf:upload>
control. This signature allows <xf:output>
to verify that signature and disallow display or download of file:
URLs not constructed by <xf:upload>
. This enhances the security of uploads.file:
URL, only that it can be read with Orbeon Forms's URL generator or <xf:output>
.xs:anyURI
type allows Orbeon Forms to make sure the uploaded file does not have to reside entirely in memory. This is the preferred method for uploading large files.xs:base64Binary
:image/pjpeg
mediatype.accept
attribute is simply passed to the web browser. As of 2013, most web browsers do support filtering files based on that attribute, as per the HTML specification. For example:accept
attribute is an XForms 2.0 feature. For backward compatibility, the mediatype
attribute is also supported.replace="all"
, those files are synchronized then.<xf:submission>
checks for uploads and interrupts the submission if:none
xforms-submit-error
eventevent('error-type')
set to xxforms-pending-uploads
xxf:uploads
AVT attribute:xxf:pending-uploads()
function returns the number of pending uploads. Example:xforms-select
is no longer dispatched when a file is selected.