Web editor: support upload files

This commit is contained in:
Unknwon 2016-08-30 05:07:50 -07:00
parent 7c31f235da
commit 643142acab
24 changed files with 503 additions and 600 deletions

View file

@ -38,10 +38,10 @@ ENABLED = true
TEMP_PATH = data/tmp/uploads
; One or more allowed types, e.g. image/jpeg|image/png. Nothing means any file type
ALLOWED_TYPES =
; Max size of each file in MB. Defaults to 32MB
FILE_MAX_SIZE = 32
; Max number of files per upload. Defaults to 10
MAX_FILES = 10
; Max size of each file in MB. Defaults to 3MB
FILE_MAX_SIZE = 3
; Max number of files per upload. Defaults to 5
MAX_FILES = 5
[ui]
; Number of repositories that are showed in one explore page

View file

@ -427,6 +427,7 @@ file_permalink = Permalink
file_too_large = This file is too large to be shown
editor.new_file = New file
editor.upload_file = Upload file
editor.edit_file = Edit file
editor.preview_changes = Preview Changes
editor.cannot_edit_non_text_files = Cannot edit non-text files
@ -459,10 +460,9 @@ editor.file_changed_while_editing = File content has been changed since you star
editor.file_already_exists = A file with name '%s' already exists in this repository.
editor.no_changes_to_show = There are no changes to show.
editor.fail_to_update_file = Failed to update/create file '%s' with error: %v
upload_files = Upload files
upload_file = Upload file
add_files_to_dir = Add files to %s
add_subdir = Add subdirectory...
editor.add_subdir = Add subdirectory...
editor.unable_to_upload_files = Failed to upload files to '%s' with error: %v
editor.upload_files_to_dir = Upload files to '%s'
commits.commits = Commits
commits.search = Search commits