FileScanProviderabstract class as a base for concrete providers:
startStream()method. The method receives a file name as provided by the web browser (which means that it must not be trusted), and HTTP header name/values as they are received by Orbeon Forms.
FileScaninterface is as follows :
bytesReceived()method is called. A provider may or may not make use of this method. If it is unused, the provider must return an
FileScanStatus(see below). This method allows incremental scanning of a file.
complete()method is called with a pointer to the temporary file. The scanner can use this method to perform the entirety of the scan in case
bytesReceived()is not used.
complete()method, resources associated with the file scan must be cleared by the provider, whether
ERRORis returned, or if any exception is thrown as part of the processing of
complete()must return a value from the
ACCEPT: accept the uploaded content
REJECT: reject the uploaded content (for example because it is suspected to contain a virus)
ERROR: any other error happened
ERRORis returned, or if any exception is thrown as part of
complete(), the uploaded file is rejected and an error is shown to the user.
abort()method is called. In this case, the file scan for the given file must be stopped and associated resources must be cleared, if any.
abort()method may be called after the