admin管理员组文章数量:1431037
Right now I am getting content from base/spaces/abc/pages/xyz which has data['id'] from response of 'base:abc.xyz' and the image from base/spaces/abc/pages/xyz/attachments where i do
for each in data['attachments']:
category = each['id']
which has category of 'base:[email protected]'... how do I link these together right now so that when i get a page I can find the images in that page
right now I am doing
match = re.match(r'(.*?)(?<!\\)@', category)
if match:
category = match.group(1) # to get category of 'base:abc.xyz
so that the image has the same id as the id of the page it is in and then find both.
BUT i am worried this is hardcoded, is it always the case that @ WITHOUT @ separates the filetype and the parent id of the page OR is this not standard and it was just the way this specific xwiki was configured?
本文标签:
版权声明:本文标题:Getting images from same page as the content (link between attachments and the page it is from) XWiki REST API - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745560981a2663473.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论