Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Get list of attachments in user macro

Raj Karan March 10, 2014

Hi there,

I am trying to create a user macro to embed videos in a page. In macro browser I want to allow user to choose video from the drop down.

There's a similar parameter type "confluence-content" but it only lists pages ans blogs, and I want to list videos. as mentioned on below page

https://wikis.nyu.edu/display/DOC/Guide+to+User+Macro+Templates#GuidetoUserMacroTemplates-type

I have seen that in some macros people has achieved this functionality, but I am having hard time in achieving this. Wondering if someone can help nme with it.

Warm Regards

Raj karan

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Daniel Borcherding
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 11, 2014

Hi Raj,

Confluence does not make the best file server. In fact by default you are not able to upload files larger than 10MB. I'd recommend trying to limiting the number and size of attachments you put inside Confluence.

You might have better luck uploading your video to an external video streaming service like youtube. I believe you can then use the multimedia macro to embed a video into a page in Confluence.

https://confluence.atlassian.com/display/DOC/Embedding+Multimedia+Content

0 votes
Mark_McGuire October 17, 2014

I don't think you'll be able to do what you want with just a user macro.

I was researching this to do the same thing and I don't think it's possible.

There is an attachment type as described in this question but it only works in macros, not user macros.  It points to the unresolved CONF-24016 ticket.  It's unfortunate because having the attachment type be valid would pretty much give you what you're looking for.

I tried to dynamically populate an enum by gathering the attachments from the page but that also didn't work.  

To do what you want, I think you'll need to write a plugin.

0 votes
Raj Karan March 11, 2014

Thanks Daniel,

What you are saying makes sense, but the videos are meant to be watched by staff only; we are prefering to have them locally hosted.

Work around we are currently using:

  • All videos are MP4 so we only need Flash player.
  • Confluence allows to increase the upload file size, So added them as attachment.
  • and then link them on the page, so they get open in browser

The only issue with this all is Full Screen option doesn't comes up in IE and that's the reason I need to have a macro which serves our purpose.

Just for the future reference, suppose instead of videos I need to get a list of PDf attachments only, then what's the best way to achieve this.

Regards

Raj karan

TAGS
AUG Leaders

Atlassian Community Events