How to restrict uploads by file extension

Bm1115xdo April 7, 2022

I would like to set a file extension that can be uploaded and a file extension that cannot be uploaded. What should I do?

1 answer

1 vote
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 7, 2022

Hi @Bm1115xdo

Welcome to Atlassian Community, and thank you for raising this request.

It's not possible to restrict file uploads by extension/ file type in Confluence Cloud. We had a few requests for this in the past, but we, unfortunately, don't have plans to implement it.

Refer to the following closed feature requests and the linked related cases: 

  • CONFCLOUD-59055 Add the ability to restrict file upload based on the file type

My sincere apologies since I know this isn't the answer you were hoping to hear. 

Take care, and I hope you have a nice rest of your week.

Shannon | Atlassian Cloud Support

Bm1115xdo April 7, 2022

Hi @Shannon S 

Thanks for your reply
It was very helpful

Let me ask you an additional question

Regarding file upload, is there a way to limit the files uploaded by other than the extension?

And, Is it possible to prohibit uploads and downloads for all files?

DJ April 7, 2022

Hi @Bm1115xdo !

You can restrict the ability to add attachments to pages at the space or site level, if that is what you are trying to do.

The global option is in the site admin console at

<your site>/wiki/admin/permissions/viewdefaultspacepermissions.action

 Cheers,

DJ

Bm1115xdo April 13, 2022

Hi @DJ 

Thanks for your reply
It was very helpful

Let me ask you an additional question

Is it possible to change the file upload authority for each page?

DJ April 13, 2022

Hi @Bm1115xdo !

You can restrict attachment operations at the space level in addition to the global restrictions linked above - but not directly on a page-by-page basis.

Strategies to get around this could include:

  • Use a combination of the global permissions and space permissions alongside organizing your content by space to keep groups of pages attachment-free per your requirements
  • Depending on your hosting model, you could write a plugin that intercepts requests to `doattachfile.action` and/or execute whatever business logic you need
    • If you did this, you could achieve your earlier requirement of restricting based on file type

Good luck!

DJ

Bm1115xdo April 13, 2022

I see

Thank you!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events