From b29661a161b400d3474f2ec4a46f8565cc560455 Mon Sep 17 00:00:00 2001 From: kshitij katiyar Date: Tue, 30 Jul 2024 22:04:52 +0530 Subject: [PATCH 1/3] [MM-1106]: Updated the default value of file attachment in Jira plugin --- server/plugin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugin.go b/server/plugin.go index 50ff0ed79..c0e9840e4 100644 --- a/server/plugin.go +++ b/server/plugin.go @@ -83,7 +83,7 @@ type externalConfig struct { DisplaySubscriptionNameInNotifications bool } -const defaultMaxAttachmentSize = utils.ByteSize(10 * 1024 * 1024) // 10Mb +const defaultMaxAttachmentSize = utils.ByteSize(100 * 1024 * 1024) // 10Mb type config struct { // externalConfig caches values from the plugin's settings in the server's config.json From 300014cdb638c8da278215a7c9119602e80a3751 Mon Sep 17 00:00:00 2001 From: kshitij katiyar Date: Tue, 30 Jul 2024 22:07:20 +0530 Subject: [PATCH 2/3] [MM-1106]: Updated the comment for max file size --- server/plugin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugin.go b/server/plugin.go index c0e9840e4..fc267fdf8 100644 --- a/server/plugin.go +++ b/server/plugin.go @@ -83,7 +83,7 @@ type externalConfig struct { DisplaySubscriptionNameInNotifications bool } -const defaultMaxAttachmentSize = utils.ByteSize(100 * 1024 * 1024) // 10Mb +const defaultMaxAttachmentSize = utils.ByteSize(100 * 1024 * 1024) // 100Mb type config struct { // externalConfig caches values from the plugin's settings in the server's config.json From 69a906db8a99634ef837319f7360c3182a98db32 Mon Sep 17 00:00:00 2001 From: kshitij katiyar Date: Fri, 2 Aug 2024 12:26:06 +0530 Subject: [PATCH 3/3] [MM-1106]: Updated the jira max file size to mattermost max fize limit --- server/plugin.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/plugin.go b/server/plugin.go index fc267fdf8..a2c05f0fc 100644 --- a/server/plugin.go +++ b/server/plugin.go @@ -169,6 +169,10 @@ func (p *Plugin) OnConfigurationChange() error { ec.MaxAttachmentSize = strings.TrimSpace(ec.MaxAttachmentSize) maxAttachmentSize := defaultMaxAttachmentSize + mattermostMaxAttachmentSize := p.API.GetConfig().FileSettings.MaxFileSize + if mattermostMaxAttachmentSize != nil { + maxAttachmentSize = utils.ByteSize(*mattermostMaxAttachmentSize) + } if len(ec.MaxAttachmentSize) > 0 { maxAttachmentSize, err = utils.ParseByteSize(ec.MaxAttachmentSize) if err != nil {