Hi
I am trying to retrieve the media attached to an appointment
$calendar = $ews->ews->getCalendar();
$oEventDetail = $calendar->getCalendarItem($ExchangeId, $ChangeKey);
$attachments = $oEventDetail->getAttachments();
I see clearly 1 media
tFileAttachment : Array
(
[0] => garethp\ews\API\Type\FileAttachmentType Object
(
[isContactPhoto] =>
[content] =>
[attachmentId] => garethp\ews\API\Type\AttachmentIdType Object
(
[rootItemId] =>
[rootItemChangeKey] =>
[id] => AAMkADZhNGEwMDM0LTUyYzQtNDY1Ni05YzhjLTk2NWY1NmY4OTA2MABGAAAAAADdQnAC3NjZSoBxMzH8bQlpBwAN5TKg81M8QL8H2m8inmvJAAAE8fPWAAAN5TKg81M8QL8H2m8inmvJAAB4IQvCAAABEgAQABIuYtzxgExAvD23NKSxL8s=
[_] =>
[_value] =>
[_typeMap] => Array
(
)
)
[name] => titres.PNG
[contentType] => image/png
[contentId] =>
[contentLocation] =>
[size] => 1889
[lastModifiedTime] => 2023-07-31T13:10:36
[_typeMap] => Array
(
[lastModifiedTime] => dateTime
)
[isInline] =>
[_] =>
[_value] =>
)
)
I see the media key clearly
$tFileAttachment[0]->getAttachmentId();
Here is my trace
garethp\ews\API\Type\AttachmentIdType Object
(
[rootItemId] =>
[rootItemChangeKey] =>
[id] => AAMkADZhNGEwMDM0LTUyYzQtNDY1Ni05YzhjLTk2NWY1NmY4OTA2MABGAAAAAADdQnAC3NjZSoBxMzH8bQlpBwAN5TKg81M8QL8H2m8inmvJAAAE8fPWAAAN5TKg81M8QL8H2m8inmvJAAB4IQvCAAABEgAQABIuYtzxgExAvD23NKSxL8s=
[_] =>
[_value] =>
[_typeMap] => Array
(
)
)
But when I try to retrieve the content, I get an error
$calendar->getAttachment($tFileAttachment[0]->getAttachmentId());
>> Fatal error: Uncaught Error: Call to undefined method garethp\ews\CalendarAPI::getAttachment()
Do you have an idea how to do this?
Thank's
Hi
I am trying to retrieve the media attached to an appointment
I see clearly 1 media
I see the media key clearly
$tFileAttachment[0]->getAttachmentId();Here is my trace
But when I try to retrieve the content, I get an error
Do you have an idea how to do this?
Thank's