The current attachment API requires the client to explicitly check for the type of API used and then perform the actions by itself. This is sub-optimal for two reasons:
The API should hide all details from the user and offer convenience methods such as
bug_attachment_get_contents ( $t_attachment_id )
bug_attachment_download_contents ( $t_attachment_id )
bug_attachment_put( $t_attachment_data )