-
-
Notifications
You must be signed in to change notification settings - Fork 205
Open
Labels
Description
When using the bulk submission form, it's possible to upload ZIP files containing XML submissions and their corresponding attachments. However, the current implementation only accepts JPEG files as attachments, excluding all others.
The relevant code is:
kpi/kobo/apps/openrosa/apps/logger/import_tools.py
Lines 86 to 89 in d646402
| with django_file(xform_fs.path, field_name="xml_file", | |
| content_type="text/xml") as xml_file: | |
| images = [django_file(jpg, field_name="image", | |
| content_type="image/jpeg") for jpg in xform_fs.photos] |
This behavior is incorrect. The expected logic should be:
- Exclude the XML file itself,
- Include any attachment referenced in the XML submission, regardless of its file type or extension.
This limitation prevents the use of valid non-JPEG attachments (e.g., PDFs, audio files), which are supported in other parts of the platform.
Thanks!