-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#4658] Added extra mimetypes to the validator
* Added extra (legacy) mime types for ZIP files on Windows to the validator check * Added data migration to update existing file components * Added merge migration, since this is being forward-ported from stable/2.6.x Forwardport-of: #4690
- Loading branch information
1 parent
92b0160
commit 180ab23
Showing
10 changed files
with
177 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
...nforms/config/migrations/0059_alter_globalconfiguration_form_upload_default_file_types.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Generated by Django 4.2.11 on 2024-09-20 09:03 | ||
|
||
from django.db import migrations, models | ||
|
||
import django_jsonform.models.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("config", "0001_initial_to_v250"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="globalconfiguration", | ||
name="form_upload_default_file_types", | ||
field=django_jsonform.models.fields.ArrayField( | ||
base_field=models.CharField( | ||
choices=[ | ||
("*", "any filetype"), | ||
("image/heic", ".heic"), | ||
("image/png", ".png"), | ||
("image/jpeg", ".jpg"), | ||
("application/pdf", ".pdf"), | ||
("application/vnd.ms-excel", ".xls"), | ||
( | ||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", | ||
".xlsx", | ||
), | ||
("text/csv", ".csv"), | ||
("text/plain", ".txt"), | ||
("application/msword", ".doc"), | ||
( | ||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document", | ||
".docx", | ||
), | ||
( | ||
"application/vnd.oasis.opendocument.*,application/vnd.stardivision.*,application/vnd.sun.xml.*", | ||
"Open Office", | ||
), | ||
( | ||
"application/zip,application/zip-compressed,application/x-zip-compressed", | ||
".zip", | ||
), | ||
("application/vnd.rar", ".rar"), | ||
("application/x-tar", ".tar"), | ||
("application/vnd.ms-outlook", ".msg"), | ||
( | ||
"application/acad.dwg,application/autocad_dwg.dwg,application/dwg.dwg,application/x-acad.dwg,application/x-autocad.dwg,application/x-dwg.dwg,drawing/dwg.dwg,image/vnd.dwg,image/x-dwg.dwg", | ||
".dwg", | ||
), | ||
], | ||
max_length=256, | ||
), | ||
blank=True, | ||
default=list, | ||
help_text="Provide a list of default allowed file upload types. If empty, all extensions are allowed.", | ||
size=None, | ||
verbose_name="Default allowed file upload types", | ||
), | ||
), | ||
] |
13 changes: 13 additions & 0 deletions
13
src/openforms/config/migrations/0060_merge_20240920_1816.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Generated by Django 4.2.16 on 2024-09-20 16:16 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("config", "0056_disable_prefill_objects_api_plugin"), | ||
("config", "0059_alter_globalconfiguration_form_upload_default_file_types"), | ||
] | ||
|
||
operations = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/openforms/forms/migrations/0097_extra_mimetypes_in_file_type.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 4.2.11 on 2024-09-20 09:02 | ||
|
||
from django.db import migrations | ||
|
||
from ..migration_operations import ConvertComponentsOperation | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("forms", "0092_v250_to_v267"), | ||
] | ||
|
||
operations = [ | ||
ConvertComponentsOperation( | ||
"file", "ensure_extra_zip_mimetypes_exist_in_file_type" | ||
), | ||
] |
13 changes: 13 additions & 0 deletions
13
src/openforms/forms/migrations/0098_merge_20240920_1808.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Generated by Django 4.2.15 on 2024-09-20 16:08 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("forms", "0097_extra_mimetypes_in_file_type"), | ||
("forms", "0097_v267_to_v270"), | ||
] | ||
|
||
operations = [] |
13 changes: 13 additions & 0 deletions
13
src/openforms/forms/migrations/0100_merge_20240920_1816.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Generated by Django 4.2.16 on 2024-09-20 16:16 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("forms", "0098_merge_20240920_1808"), | ||
("forms", "0099_form_show_summary_progress"), | ||
] | ||
|
||
operations = [] |