render attachment error

163 views
Skip to first unread message

Юрий Клещенок

unread,
Apr 17, 2015, 6:34:06 AM4/17/15
to atlassian-...@googlegroups.com
Hello, guys. 
I'm trying render my macro body with "/rest/api/contentbody/convert/view", but get some problem with ri:attachment (ri:url work fine):
storage for render:

<table>
<tbody>
<tr><th>a</th><th>s</th><th>d</th></tr>
<tr><td>k</td><td><p><ac:image ac:height="250"><ri:attachment ri:filename="myJpg.jpg" /></ac:image></p></td><td><ac:image ac:height="250"><ri:url ri:value="http://my-pc:1990/confluence/download/thumbnails/1048580/%D0%91%D0%B5%D0…0%BD%D0%BD%D1%8B%D0%B9.jpg?api=v2&amp;nonce=2015-04-17T13%3A13%3A24%2B0300" /></ac:image>l</td></tr>
</tbody>
</table>
response(only img code):
<p><img src="/confluence/plugins/servlet/confluence/placeholder/error?i18nKey=editor.placeholder.broken.image&locale=en_GB&version=2" title="" class="transform-error" data-encoded-xml="%3Cac%3Aimage+ac%3Aheight%3D%22250%22%3E%3Cri%3Aattachment+ri%3Afilename%3D%22myJpg.jpg%22+%2F%3E%3C%2Fac%3Aimage%3E" /></p></td><td class="confluenceTd"><span class="confluence-embedded-file-wrapper confluence-embedded-manual-size"><img class="confluence-embedded-image confluence-external-resource" height="250" src="http://my-pc:1990/confluence/download/thumbnails/1048580/%D0%91%D0%B5%D0…0%BD%D0%BD%D1%8B%D0%B9.jpg?api=v2&amp;nonce=2015-04-17T13%3A13%3A24%2B0300" data-image-src="http://my-pc:1990/confluence/download/thumbnails/1048580/%D0%91%D0%B5%D0…0%BD%D0%BD%D1%8B%D0%B9.jpg?api=v2&amp;nonce=2015-04-17T13%3A13%3A24%2B0300"></span>l</td>
any ideas what i'm doind wrong?

Юрий Клещенок

unread,
Apr 17, 2015, 7:51:37 AM4/17/15
to atlassian-...@googlegroups.com
Same render error with IncludeMacro inside my plugin:
Unable to render {include} The included page could not be found.
But outside it works fine.

Matthew Jensen

unread,
Apr 22, 2015, 8:27:48 PM4/22/15
to atlassian-...@googlegroups.com
The rest API you are calling ("/rest/api/contentbody/convert/view") simply takes storage format and renders it, it has no context of a page which is why the attachment link is not working.  So this resource has no idea what page to look for the attachment.

Same render error with IncludeMacro inside my plugin:
Unable to render {include} The included page could not be found.
But outside it works fine.

I'm not sure what you mean by this, can you give some more information? 

--
You received this message because you are subscribed to the Google Groups "Atlassian Connect Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to atlassian-connec...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Юрий Клещенок

unread,
Apr 27, 2015, 9:01:13 AM4/27/15
to atlassian-...@googlegroups.com

The rest API you are calling ("/rest/api/contentbody/convert/view") simply takes storage format and renders it, it has no context of a page which is why the attachment link is not working.  So this resource has no idea what page to look for the attachment.
So, is there a way to render attached pictures?

I'm not sure what you mean by this, can you give some more information? 
 I'm trying render body with Include Page macro (https://confluence.atlassian.com/display/DOC/Include+Page+Macro).Sure, i select existing page.
Reply all
Reply to author
Forward
0 new messages