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:
@@ -20,6 +20,10 @@ Mousetrap.bind(['e'], function( e ) {
|
||||
class="action-fileview">Files</a></li>
|
||||
<li class="minibutton jaws">
|
||||
<a href="#" id="minibutton-new-page">New</a></li>
|
||||
{{#allow_uploads}}
|
||||
<li class="minibutton jaws">
|
||||
<a href="#" id="minibutton-upload-page">Upload</a></li>
|
||||
{{/allow_uploads}}
|
||||
{{#editable}}
|
||||
<li class="minibutton jaws">
|
||||
<a href="#" id="minibutton-rename-page">Rename</a></li>
|
||||
|
||||
Reference in New Issue
Block a user