Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve Attachment Maximum Size value from Global Configuration ?

Dmytro Slobodenyuk August 31, 2018

Hello, I am developing plugin for Confluence, and plugin has own page where we have a form for uploading images and I would like to retrieve Attachment Maximum Size value from Global Configuration and check. How can I do this within my plugin code ? 

2 answers

1 accepted

1 vote
Answer accepted
Tobias Anstett _K15t_
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.
August 31, 2018

Hi Dmytro,

Have you already tried to load it using the com.atlassian.confluence.setup.settings.DefaultSettingsManager? This manager provides a getGlobalSettings() method which returns a Settings object allowing you to ask for getAttachmentMaxSize().

You need to inject it as any other manager.

Best,
Tobias

Dmytro Slobodenyuk August 31, 2018

Hi,

Yes already :), Thank you, it works for me.

0 votes
Victor Mutambuki
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.
August 31, 2018

Screen Shot 2018-08-31 at 8.34.10 AM.png

Dmytro,

Go to Systems --> Advanced --> Attachements --> Edit Settings

victor

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events