Return document max file size in megabytes
The same way it's done for images. We were converting the number of megabytes to bytes and then converting it to megabytes again. Instead, we can leave it as it is and only convert it to bytes when necessary (only one place).
This commit is contained in:
@@ -12,7 +12,7 @@ module Documentable
|
||||
end
|
||||
|
||||
def max_file_size
|
||||
Setting["uploads.documents.max_size"].to_i.megabytes
|
||||
Setting["uploads.documents.max_size"].to_i
|
||||
end
|
||||
|
||||
def accepted_content_types
|
||||
|
||||
Reference in New Issue
Block a user