Add file upload functionality
Adds an :allow_uploads wiki option, an --allow-uploads flag to bin/gollum, an "Upload" button with a file upload dialog, and a handler to commit uploaded files into the repository. :allow_uploads defaults to false, to prevent unauthenticated users from uploading arbitrary files into the repository (albeit only in the uploads directory). This code is based on the patch from @l3iggs at https://github.com/gollum/gollum/issues/694, but the handling on the backend is completely rewritten to use the Committer infrastructure.
This commit is contained in:
@@ -39,6 +39,10 @@ module Precious
|
||||
@editable
|
||||
end
|
||||
|
||||
def allow_uploads
|
||||
@allow_uploads
|
||||
end
|
||||
|
||||
def has_header
|
||||
@header = (@page.header || false) if @header.nil?
|
||||
!!@header
|
||||
|
||||
Reference in New Issue
Block a user