diff --git a/lib/gollum-lib/wiki.rb b/lib/gollum-lib/wiki.rb
index <HASH>..<HASH> 100644
--- a/lib/gollum-lib/wiki.rb
+++ b/lib/gollum-lib/wiki.rb
@@ -183,6 +183,9 @@ module Gollum
     #                             - :left
     #                             - :right
     #           :allow_uploads - Set to true to allow file uploads.
+    #           :per_page_uploads - Whether uploads should be stored in a central
+    #                            'uploads' directory, or in a directory named for
+    #                            the page they were uploaded to.
     #
     # Returns a fresh Gollum::Repo.
     def initialize(path, options = {})
@@ -223,6 +226,7 @@ module Gollum
       @user_icons           = ['gravatar', 'identicon'].include?( options[:user_icons] ) ?
                               options[:user_icons] : 'none'
       @allow_uploads        = options.fetch :allow_uploads, false
+      @per_page_uploads     = options.fetch :per_page_uploads, false
     end
 
     # Public: check whether the wiki's git repo exists on the filesystem.
@@ -687,6 +691,10 @@ module Gollum
     # Toggles file upload functionality.
     attr_reader :allow_uploads
 
+    # Toggles whether uploaded files go into 'uploads', or a directory
+    # named after the page they were uploaded to.
+    attr_reader :per_page_uploads
+
     # Normalize the data.
     #
     # data - The String data to be normalized.
gollum-lib changes required to implement per-page uploads