Hello,
please you this code:
#$myFile = "contact.htm"; # HTML FILE WORKS
#$contenttype = "text/plain"; # HTML FILE WORKS
$myFile = "CristmasCard.jpg"; #JPG FILE DOESN'T WORKS
$contenttype = "IsBase64Encoded"; #JPG FILE DOESN'T WORKS
$mydirFile = $mydir . $myFile;
$fh = fopen($mydirFile,'rb ...
Search found 6 matches
- 08 Feb 2012, 13:43
- Forum: Developers
- Topic: Attachments via SOAP
- Replies: 22
- Views: 53532
- 14 Jan 2011, 13:21
- Forum: Developers
- Topic: Attachments via SOAP
- Replies: 22
- Views: 53532
Re: Attachments via SOAP [SOLVED]
Hi Shihan,
finaly now it works, I had to modify a little bit your perl code, because it did not worked with OTRS 3.0.4
Attached the code, perhaps somebody runs in the same issues:
# add attachments
if ( $Param{Attachment} ) {
if ( $Param{Attachment} ) {
use MIME::Base64;
for my $Attachment ...
finaly now it works, I had to modify a little bit your perl code, because it did not worked with OTRS 3.0.4
Attached the code, perhaps somebody runs in the same issues:
# add attachments
if ( $Param{Attachment} ) {
if ( $Param{Attachment} ) {
use MIME::Base64;
for my $Attachment ...
- 14 Jan 2011, 10:20
- Forum: Developers
- Topic: Attachments via SOAP
- Replies: 22
- Views: 53532
Re: Attachments via SOAP
Hi Shihan,
- I said I have modified the Ticket.pm but this is not correct, I modified the Article.pm and I added the addtional line to this.
- Also I added the $theData = base64_encode($theData); in the php code to use the base64 encoding.
Sending binary attachments works. You have to specifiy the ...
- I said I have modified the Ticket.pm but this is not correct, I modified the Article.pm and I added the addtional line to this.
- Also I added the $theData = base64_encode($theData); in the php code to use the base64 encoding.
Sending binary attachments works. You have to specifiy the ...
- 13 Jan 2011, 21:40
- Forum: Developers
- Topic: Attachments via SOAP
- Replies: 22
- Views: 53532
Re: Attachments via SOAP
Thank you Francesco and Shihan, I had made some progress, but I still have the problem to use ArticleSend() with Attachments like .jpg.
- I changed the Attachment from the DB to FS and I am able to create Attachments on the fly with the ftp, php code, but I was not able to send this attachments with ...
- I changed the Attachment from the DB to FS and I am able to create Attachments on the fly with the ftp, php code, but I was not able to send this attachments with ...
- 13 Jan 2011, 12:13
- Forum: Developers
- Topic: Attachments via SOAP
- Replies: 22
- Views: 53532
Re: Attachments via SOAP
Hi,
thank you! That was a good help and it creates the Ticket and the Attachment.
My problem now is that I also want to send the attachments together with the the article.
The code in the SOAP API ArticleSend includes the Attachment:
my $ArticleID = $TicketObject->ArticleSend(
TicketID => 123 ...
thank you! That was a good help and it creates the Ticket and the Attachment.
My problem now is that I also want to send the attachments together with the the article.
The code in the SOAP API ArticleSend includes the Attachment:
my $ArticleID = $TicketObject->ArticleSend(
TicketID => 123 ...
- 12 Jan 2011, 21:37
- Forum: Developers
- Topic: Attachments via SOAP
- Replies: 22
- Views: 53532
Re: Attachments via SOAP
I also have the same issue with Attachments like pdf/jpg/xls etc.
My php code works ony for html/txt files.
Code:
$myFile = "c:\\contact.htm";
$fh = fopen($myFile,'rb') or die($php_errormsg);
$theData = fread($fh,filesize($myFile));
fclose($fh) or die($php_errormsg);
$articleattachment ...
My php code works ony for html/txt files.
Code:
$myFile = "c:\\contact.htm";
$fh = fopen($myFile,'rb') or die($php_errormsg);
$theData = fread($fh,filesize($myFile));
fclose($fh) or die($php_errormsg);
$articleattachment ...