aboutsummaryrefslogtreecommitdiffstats
path: root/modules/structs
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-09-05 09:43:06 +0200
committerGitHub <noreply@github.com>2020-09-05 08:43:06 +0100
commitdba5d82f86dc9dc757404f03bf80ebbe28a5a0b1 (patch)
treeb59de4d8745ff000d3e4fc9c581ede5abaae6bdf /modules/structs
parentbab1204db4c6f0b3346a84b3c37fd6386fcee48d (diff)
downloadgitea-dba5d82f86dc9dc757404f03bf80ebbe28a5a0b1.tar.gz
gitea-dba5d82f86dc9dc757404f03bf80ebbe28a5a0b1.zip
Expose Attachemnt Settings by API (#12514)
close #12368
Diffstat (limited to 'modules/structs')
-rw-r--r--modules/structs/settings.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/structs/settings.go b/modules/structs/settings.go
index f1ff1344ea..6874d6705b 100644
--- a/modules/structs/settings.go
+++ b/modules/structs/settings.go
@@ -22,3 +22,11 @@ type GeneralAPISettings struct {
DefaultGitTreesPerPage int `json:"default_git_trees_per_page"`
DefaultMaxBlobSize int64 `json:"default_max_blob_size"`
}
+
+// GeneralAttachmentSettings contains global Attachment settings exposed by API
+type GeneralAttachmentSettings struct {
+ Enabled bool `json:"enabled"`
+ AllowedTypes string `json:"allowed_types"`
+ MaxSize int64 `json:"max_size"`
+ MaxFiles int `json:"max_files"`
+}