Implement the ability to store uploads on a per-page basis
Storing all uploaded files in a single directory kinda sucks when you've got a largish wiki, or the possibility of filename collisions. With this patch, though, you can set `:per_page_uploads => true` in your wiki settings and have the file uploaded to a directory named for the page you were on when you clicked 'Upload'.
This commit is contained in:
@@ -42,6 +42,10 @@ module Precious
|
||||
def allow_uploads
|
||||
@allow_uploads
|
||||
end
|
||||
|
||||
def upload_dest
|
||||
@upload_dest
|
||||
end
|
||||
|
||||
def has_header
|
||||
@header = (@page.header || false) if @header.nil?
|
||||
|
||||
Reference in New Issue
Block a user