[IMP] survey_extra_fields: new params max_file_size and allowed_extensions for file question type
Some checks failed
pre-commit / pre-commit (pull_request) Failing after 1m45s

This commit is contained in:
2026-02-18 17:49:33 +01:00
parent e45bccc3e3
commit b63b8ba885
9 changed files with 241 additions and 8 deletions

View File

@@ -9,3 +9,12 @@ class SurveyQuestion(models.Model):
question_type = fields.Selection(
selection_add=[("file", "File")]
)
max_file_size = fields.Integer(
string="Max File Size (MB)",
default=10,
help="Maximum file size in MB. Leave 0 for no limit.",
)
allowed_extensions = fields.Char(
string="Allowed Extensions",
help="Comma-separated list of allowed extensions (e.g. .pdf,.docx). Leave empty to allow all types.",
)