title: OTRS attachments
body: <p>I am creating a customer ticketing portal, which uses OTRS as backend. The portal allow customers to create tickets and also upload attachments.</p>
  
  <p>I have written a webservice using PHP and nuSOAP, that does the work of inserting the ticket details and attachment details in the appropriate OTRS tables (ticket,ticket_history,article,article_attachment etc). 
  But since I am using webservice, i base64_encode the attachment, before sending it as a parameter to my webservice method. And when i base64_decode this content on the OTRS side, I cannot udnerstand for the life of me why it dsnt get inserted into the database. So I insert the content without decoding it. </p>
  
  <p>And on my portal page, when I click to dowload the attachment, I base64_decode the content before displaying the attachment.</p>
  
  <p>It all works fine for the customer portal, but when I try to download the attachment from the agent ticket zoom page in OTRS, it says the file format is not supported. Which is understandable, because the content is encoded and shld be decoded before downloading it.</p>
  
  <p>What is the best way to troubleshoot this problem ? Or how can I make OTRS base64_decode the content before downloading the attachment ?</p>