Skip to content

bulk-submission-form doesn't accept non-image attachments #5975

@nicopace

Description

@nicopace

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:

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions