Actions

rtamazon_sent_to_s3

This action is fired after a file is uploaded and transcoded on website and sent to the s3 bucket for upload.

Parameters:
– status: It contains either boolean true if file was successfully uploaded, else a WP_Error object.
– uploaded_file: Its an array which contains values similar to an array returned by wp_upload_bits function.

add_action( 'rtamazon_sent_to_s3', 'rtawss3_sent_to_s3',10,1);
/**
 * Check transcoded file is uploaded to s3.
 *
 * @param array       $uploaded_file Uploaded file details.
 * @param bool|object $status        Status of uploaded file, either true or error object.
 */
function rtawss3_sent_to_s3( $uploaded_file, $status ){
	if ( is_wp_error( $status ) ) {
		error_log( 'Error uploading ' . $uploaded_file['file'] . ' to S3: ' . $status->get_error_message() );
	}
}