cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Display Text Attachment as image in Text field using CLI

mbräunlein
1-Newbie

Display Text Attachment as image in Text field using CLI

Hi,

i managed to attach an image to the Text Attachment field using the command

     im editissue --addAttachment=C:\tmp\test.png 123

I can add the image to the Text field by right clicking the field and select "Insert -> Image..." and then choose the image from my Text Attachments.

But i did not find a way to do the same thing using the CLI.

Any hints are appreciated.

Best Regards,

Michael

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

i found a solution mentioned here How to put Image into a RichTextField?

For other facing the same problem here the solution i use:

im editissue --richContentField=Text="<img src=mks:///item/field?TextAttachments&attachmentname=test.png>" 123

This has to be done after adding the file to the Text Attachments field with the command mentioned in my original question.

Best,

Michael

View solution in original post

4 REPLIES 4

Mike,

Does this work?

im editissue --addAttachment="C:\tmp\test.png" "123"

Hi Daniel,

thank you for your answer.

Unfortunately your solution does not work for me. The image gets added to the field Attachments instead of Text Attachments but it still has to be added manually to the Text field to be displayed.

Best,

Michael

Hi,

i found a solution mentioned here How to put Image into a RichTextField?

For other facing the same problem here the solution i use:

im editissue --richContentField=Text="<img src=mks:///item/field?TextAttachments&attachmentname=test.png>" 123

This has to be done after adding the file to the Text Attachments field with the command mentioned in my original question.

Best,

Michael

fkullmann
5-Regular Member
(To:mbräunlein)

Hello,

 

i have a simliar problem and tried your suggested string after having the png-picture added as text attachment:

 

im editissue --richContentField=Text="<img src=mks:///item/field?TextAttachments&attachmentname=test.png>" 123

 

unfortunately, the text field does only show an icon, which represents a non loaded image. If clicking on the icon, an error message says Attachment not found.

 

Do I have to replace the mks:// by another string representing the server address?

 

Thanks in advance for your answer

 

Top Tags