I am creating a customer ticketing portal using PHP, which uses OTRS 2.4.5 as backend. The portal allows customers to create tickets and also upload attachments.
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 understand for the life of me why it doesn't get inserted into the database. So I insert the content without decoding it.
And on my portal page, when I click to download the attachment, I "base64_decode" the content before displaying the attachment.
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 should be decoded before downloading.
What is the best way to troubleshoot this problem ? Or how can I make OTRS "base64_decode" the content before downloading the attachment ?
OTRS attachments
Moderator: crythias