Hi all, is there any way to develop a macro to summarize the total disk space used by attachments in a space (including subspaces), or an existing macro to do it?
Thanks in advance.
Amin
Can I perform a search as "Search Results Macro", that returns a list of Attachment objects and do the SUM on my own?
Hey Amin,
If you have the SQL Plugin installed, you can use the following query:
{sql:dataSource=confluence} SELECT (SUM([FILESIZE])/1024/1024) AS Attachments_in_MBs FROM confluence.ATTACHMENTS{sql}
Note that when you only ask for the SUM you get the total size of the attachments back in bytes. I converted it to MB's to make it readable.
If you dont have the SQL Plugin, you can find it here: https://studio.plugins.atlassian.com/wiki/display/SQL/Confluence+SQL+Plugin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply,
I cannot make use of that plugin in this environment. I've to use only confluence API classes or another existing macro. In addition, it would be necessary to include subspaces in that sum.
Thanks again.
Amin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.