|
From: Robert M. <rob...@gm...> - 2017-03-28 19:13:41
|
Hi Iain, On Tue, Mar 28, 2017 at 5:47 AM, Iain Barnetson <iai...@gm...> wrote: > I'm trying to download an attachment from a ticket. > I can get the ticket information including the attachment id but cant seem > to find a way to get the file. > > # I get the ticket information with this query > $mantis = New-WebServiceProxy -Uri > http://tickets.empyreanbenefits.com/api/soap/mantisconnect.php?wsdl > $ticketdetails = $mantis.mc_issue_get($Sec.Username,$Sec.Password,$ticket) > > # I can get the attachmetn information with this query > $ticketdetails.Attachments > > # Which returns the information below. Uisng that I try and get the file by > using > > $AttachmentId = $ticketdetails.Attachments.id > $mantis.mc_issue_attachment_get('ibarnetson','pwd',$AttachmentId) > > But it just returns a stream of numbers, no file. That should be the attachment raw data, possibly encoded in Base64 format ( not sure if the underlying libraries perform the decoding for you or not ). Robert |