Skip to content

Commit 5a939ef

Browse files
authored
Change the content type of generated XMLs in storage metadata (#728)
* Change the content type of generated XMLs in storage metadata * Add content disposition header to generated XMLs * Update dependencies
1 parent 6b5ce3b commit 5a939ef

3 files changed

Lines changed: 249 additions & 241 deletions

File tree

backend/donations/views/download_donations/byof.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ def handle_external_data_processing(own_upload_id: int) -> dict | None:
9898

9999
# Save to FileField
100100
own_upload.result_data.save("data.xml", xml_file, save=False)
101+
own_upload.result_data.storage.object_parameters.update(
102+
{"ContentType": "application/octet-stream", "ContentDisposition": "attachment"}
103+
)
101104
own_upload.status = OwnFormsStatusChoices.SUCCESS
102105
own_upload.save()
103106

0 commit comments

Comments
 (0)