Best option for exporting attachments on a page?

Hello,

From our testing, the HTML export doesn’t include attachments (this is different from Confluence). Is there a recommended route for exporting attachments from a specific page/set of pages in XWiki that ideally doesn’t involve a manual process (i.e., downloading each attachment individually) or scripting - or plans for this in the future? We’d like to instruct our staff (non-IT) who will be performing some record management actions and wiki gardening :sunflower: of various spaces.

Thanks!

It definitely does for me, but only when the attachment is used. Is your use case related to attachments attached to a page but not used in any content ?

Thanks Thomas!

You’re totally right - I see them now. I just needed to drill down the ‘attachment’ folder to get to the specific page - it was farther down than I was expecting because its a fairly nested page.

If you need all attachments and not only the referenced ones you can also implement a button to do this via a JSExtension. I had a similar usecase not to long ago and I had to help myself via scripting. It’s a bit hacky because everything gets downloaded individually, does not play well with image attachments and the user has to allow popups on the site. If you need this, just let me know and I can provide more details on how the implementation works.

Thanks Lukas!

That’s good to know. I believe in Confluence all attachments were included in the HTML export, not just the ones referenced on the page, so that’s definitely something to be aware of / make our exporters aware of.

If you’re up for sharing the script (as a snippet maybe?), that would be fantastic and much appreciated :slightly_smiling_face:

Have a great day!

Good idea, I’ll do it tomorrow!
Have a great day as well :slight_smile:

I am interested too ! :slightly_smiling_face:
Thanks !

Hey guys,
just published here.
Sorry for the delay! Feel free to suggest improvements - this is probably not the optimal or most secure implementation :smiley:

Thanks so much @lukasM !!

This is great :slightly_smiling_face: