0

Is there anyway to restrict the attachments of types - .bat/.exe/.bmp, etc to be restricted while user trying to upload them in JIRA.

I tried using the Servlet-Filter plugin module in JIRA. But I am not able to get the URL at the time of uploading the attachment. Also I am trying to listen to the Attachment event for an issue.

Is there any other alternative of restricting these file types.

Any help will be much appreciated.

Thanks!

Naren
  • 109
  • 1
  • 3
  • 13

1 Answers1

1

Well there was an Attachment Filter available but I am not sure if it is still relevant - it actually seems that it is no longer relevant also if I recall correctly it was for Confluence. So you're left with writing a custom plugin for this.

You could implement com.atlassian.jira.issue.AttachmentManager, the default implementation is com.atlassian.jira.issue.managers.DefaultAttachmentManager and wrap it so that you check what's going on with the upload - filetype etc. But be sure to check the mime-type - not only the file name and/or extension. Check this out.

Borislav Sabev
  • 4,776
  • 1
  • 24
  • 30