Show More
@@ -117,7 +117,7 b' def get_file_hash(file) -> str:' | |||||
117 |
|
117 | |||
118 | def validate_file_size(size: int): |
|
118 | def validate_file_size(size: int): | |
119 | max_size = boards.settings.get_int('Forms', 'MaxFileSize') |
|
119 | max_size = boards.settings.get_int('Forms', 'MaxFileSize') | |
120 | if size > max_size: |
|
120 | if max_size > 0 and size > max_size: | |
121 | raise forms.ValidationError( |
|
121 | raise forms.ValidationError( | |
122 | _('File must be less than %s but is %s.') |
|
122 | _('File must be less than %s but is %s.') | |
123 | % (filesizeformat(max_size), filesizeformat(size))) |
|
123 | % (filesizeformat(max_size), filesizeformat(size))) |
General Comments 0
You need to be logged in to leave comments.
Login now