mirror of
https://github.com/gogs/gogs.git
synced 2026-03-04 11:11:03 +01:00
Feature for editing, creating, uploading and deleting files
This commit is contained in:
@@ -110,6 +110,8 @@ var (
|
||||
ForcePrivate bool
|
||||
MaxCreationLimit int
|
||||
PullRequestQueueLength int
|
||||
LineWrapExtensions []string
|
||||
PreviewTabApis []string
|
||||
}
|
||||
RepoRootPath string
|
||||
ScriptType string
|
||||
@@ -129,6 +131,7 @@ var (
|
||||
Markdown struct {
|
||||
EnableHardLineBreak bool
|
||||
CustomURLSchemes []string `ini:"CUSTOM_URL_SCHEMES"`
|
||||
MdFileExtensions []string
|
||||
}
|
||||
|
||||
// Picture settings
|
||||
@@ -148,6 +151,13 @@ var (
|
||||
AttachmentMaxFiles int
|
||||
AttachmentEnabled bool
|
||||
|
||||
// Repo Upload settings
|
||||
UploadTempPath string
|
||||
UploadAllowedTypes string
|
||||
UploadMaxSize int64
|
||||
UploadMaxFiles int
|
||||
UploadEnabled bool
|
||||
|
||||
// Time settings
|
||||
TimeFormat string
|
||||
|
||||
@@ -437,6 +447,16 @@ func NewContext() {
|
||||
log.Fatal(4, "Fail to map Repository settings: %v", err)
|
||||
}
|
||||
|
||||
sec = Cfg.Section("upload")
|
||||
UploadTempPath = sec.Key("UPLOAD_TEMP_PATH").MustString(path.Join(AppDataPath, "tmp/uploads"))
|
||||
if !filepath.IsAbs(UploadTempPath) {
|
||||
UploadTempPath = path.Join(workDir, UploadTempPath)
|
||||
}
|
||||
UploadAllowedTypes = strings.Replace(sec.Key("UPLOAD_ALLOWED_TYPES").MustString(""), "|", ",", -1)
|
||||
UploadMaxSize = sec.Key("UPLOAD_FILE_MAX_SIZE").MustInt64(32)
|
||||
UploadMaxFiles = sec.Key("UPLOAD_MAX_FILES").MustInt(10)
|
||||
UploadEnabled = sec.Key("ENABLE_UPLOADS").MustBool(true)
|
||||
|
||||
// UI settings.
|
||||
sec = Cfg.Section("ui")
|
||||
ExplorePagingNum = sec.Key("EXPLORE_PAGING_NUM").MustInt(20)
|
||||
|
||||
Reference in New Issue
Block a user