summaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
authorKim Carlbäcker <kim.carlbacker@gmail.com>2016-07-12 00:21:26 +0200
committer无闻 <u@gogs.io>2016-07-12 06:21:26 +0800
commitf4ab50501ebc3d216dd216c72f5f8ff53fa6efc1 (patch)
tree787acd1bf0d3a69c348c509a299e27995b094190 /conf
parentde10387f41c02aef2d97ca5f247a422f18e6fb38 (diff)
downloadgitea-f4ab50501ebc3d216dd216c72f5f8ff53fa6efc1.tar.gz
gitea-f4ab50501ebc3d216dd216c72f5f8ff53fa6efc1.zip
[Fix] Don't display way too large files #1513 (#3253)
* Add MaxDisplayFileSize setting * Don't show files that are too large * Localized FileTooLarge * Change IsFileTooBig => IsFileTooLarge
Diffstat (limited to 'conf')
-rw-r--r--conf/app.ini2
-rw-r--r--conf/locale/locale_en-US.ini1
2 files changed, 3 insertions, 0 deletions
diff --git a/conf/app.ini b/conf/app.ini
index 755041cfe2..968c276813 100644
--- a/conf/app.ini
+++ b/conf/app.ini
@@ -31,6 +31,8 @@ FEED_MAX_COMMIT_NUM = 5
; An invalid color like "none" or "disable" will have the default style
; More info: https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
THEME_COLOR_META_TAG = `#ff5343`
+; Max size of files to be displayed (defaults is 8MiB)
+MAX_DISPLAY_FILE_SIZE = 8388608
[ui.admin]
; Number of users that are showed in one page
diff --git a/conf/locale/locale_en-US.ini b/conf/locale/locale_en-US.ini
index 0339387a45..6f63412f92 100644
--- a/conf/locale/locale_en-US.ini
+++ b/conf/locale/locale_en-US.ini
@@ -409,6 +409,7 @@ file_raw = Raw
file_history = History
file_view_raw = View Raw
file_permalink = Permalink
+file_too_large = This file is too large to be shown
commits.commits = Commits
commits.search = Search commits