Is there any restrictions for Wiki Page size? My impression is that the size is limited by 500 KByte. On attempts to insert HTML code more than 500 KByte I am unable to save page. Just in case attached is screenshot with error message in Console area.
Solved! Go to Solution.
@ekitayev ,
Yes, there is a limit, and it's just about 500kB.
If you look at the source code for app/models/wiki_page.rb, you'll see the following at line 27. (I split it up over 4 lines so it would show without scrolling)
validates_length_of :body,
:maximum => maximum_long_text_length,
:allow_nil => true,
:allow_blank => true
We can see that the maximum length of a body is the constant "maximum_long_text_length".
That value is defined in /config/initializers/active_record.rb on lines 82-84.
def self.maximum_long_text_length
@maximum_long_text_length ||= 500.kilobytes-1
end
It's 1 byte less than 500 kilobytes, but you were really close without pouring through the source code to find the answer.
@ekitayev ,
Yes, there is a limit, and it's just about 500kB.
If you look at the source code for app/models/wiki_page.rb, you'll see the following at line 27. (I split it up over 4 lines so it would show without scrolling)
validates_length_of :body,
:maximum => maximum_long_text_length,
:allow_nil => true,
:allow_blank => true
We can see that the maximum length of a body is the constant "maximum_long_text_length".
That value is defined in /config/initializers/active_record.rb on lines 82-84.
def self.maximum_long_text_length
@maximum_long_text_length ||= 500.kilobytes-1
end
It's 1 byte less than 500 kilobytes, but you were really close without pouring through the source code to find the answer.