Hello everyone.

First of all, forgive my English.

I use the API Mantisconnect to create issue with attachment.

The creation goes well, 
however when I want to open the attachment (MantisBT side), 
the file seems corrupt and MIME type does not always match.



To send attachment i used this :

$doc = new Document();
$doc->getFromDB($row["documents_id"]);
$path = $doc->getField('filepath');
$data = file_get_contents($path);
//here i check if file_get_contents() return true or false
$data    = base64_encode($data);
$ws->mc_issue_attachment_add($idIssueCreate, $doc->getField('filename'), 
$doc->getField('mime'), $data);


I tried with 
MantisBT version 1.2.15 and Ubuntu 14.04 MySQL 5.5.37
MantisBT version 1.2.17 and CentOS 6.5 MySQL -5.1.73-3.el6_5.x86_64


Thank you for your Help.

Best regards


Stanislas Kita 
Développeur 
sk...@teclib.com 

teclib' Caen - Bâtiment Olympus, 9 rue Léopold Sédar Senghor, 14460 Colombelles 
Tel. +33 1 84 16 23 39 - Std. +33 1 79 97 02 78 - Fax. +33 1 72 70 31 18 
Facebook | Twitter | www.teclib.com 

Prochains événements teclib' : 
> Jeudi 11 Septembre 2014 à 16h30 : Événement GLPI - Gestion de parc : Réserver 
> une place 
> Jeudi 18 Septembre 2014 à 16h30 : Événement Sendlib' - Dématérialisation de 
> courriers : Réserver une place 
> Jeudi 25 Septembre 2014 à 16h30 : Événement Seren'IT - Offre d'infogérance : 
> Réserver une place 


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
mantisbt-help mailing list
mantisbt-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mantisbt-help

Reply via email to