NAME
Net::AS2::PSGI::FileHandler - Provides methods to handle files being sent and received
METHODS
- = $self->receiving( $content, $receiving_dir )
 - 
This method is called when
$contentis being received.By default, this method stores the given content into a filename in the RECEIVING directory as given by
$self->file($receiving_dir).Note This method must not be used to send an MDN response. It is called immediately after the request has been received and before the response has been sent back to the partner.
 - = $self->received( $receiving_file, $received_dir, $message )
 - 
This method is called when the content of
$receiving_filehas been received.$messageis an object of class Net::AS2::Message.By default, this method renames the given
$receiving_fileto a file in the RECEIVED directory, calculated by$self->file($received_dir, $ext). If the transfer was not successful, a file extension is calculated from the state of the$messageobject:State Extension $message->is_success() None $message->is_error() .error $message->is_failure() .failedThe received Content-Disposition header filename attribute is available for use as
$message->filename().Note This method must not be used to send an MDN response. It is called immediately after the request has been received and before the response has been sent back to the partner.
 - = $self->sending( $content, $sending_file )
 - 
This method is called when
$contentis being sent.By default, this method stores the given content into the
$sending_file, which is calculated by$self->file($sending_dir). - = $self->sent( $sending_file, $sent_dir, $successful )
 - 
This method is called when the content of
$sending_filehas been sent.$successfulis either a true or false value depending upon whether the content was received by the partner successfully or not.By default, this method renames the given
$sending_fileto a file in the SENT directory, calculated by$self->file($sent_dir, $ext). If the transfer was not successful, a file extension, ".failed" is used for$ext.