cancel
Showing results for 
Search instead for 
Did you mean: 

Read Attachment Name in Mapping

Former Member
0 Kudos

Hello,

I read attachments in my scenario using a UDF and flag "read attachments" in operations mapping.

It works perfectly fine to read the content of the attachment, however I also need the name of the attachments. I tried to use the method getContentID() but some characters of the returned value are different to the attachment name.

Is there any way to get access to the attachment name?

Accepted Solutions (0)

Answers (2)

Answers (2)

stefan_grube
Active Contributor
0 Kudos

Use getContentType()

The content type is a string like this: text/plain;charset=UTF8;filename=file.txt"

Former Member
0 Kudos

Hi ,

just tried using the method getContentType(), however the only value that I get back is application/pdf.

stefan_grube
Active Contributor
0 Kudos

What do you see in sxmb_moni? Here you can see the contenttype of the message.

Former Member
0 Kudos

Hi,

in SXMB_MONI I just see "application/pdf" as content of the element....

stefan_grube
Active Contributor
0 Kudos

> in SXMB_MONI I just see "application/pdf" as content of the element....

I that case, no filename is provided and you cannot access it.

Former Member
0 Kudos

You can fetch the name using UDF. Please refer to the following threads

Venkat.

Former Member
0 Kudos

Hello,

thank you for your links. However this seems to be more related to setting names of attachments for a receiver. I just would like to read the name of a received attachment.

Former Member
0 Kudos

If you are >= 7.0 SP12, you can read the attachment name with a self-written adapter module using the method getContentType.

Venkat.