Fix double content-disposition header for files with commas
This commit is contained in:
parent
345e935655
commit
5d40bce806
|
|
@ -68,7 +68,7 @@ class DocumentUploadApiTestCase(APITestCase):
|
||||||
|
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
response.data["fields"]["Content-Disposition"],
|
response.data["fields"]["Content-Disposition"],
|
||||||
f"attachment; filename={self.test_data['file_name']}",
|
f'attachment; filename="{self.test_data["file_name"]}"',
|
||||||
)
|
)
|
||||||
|
|
||||||
file_id = response.data["file_id"]
|
file_id = response.data["file_id"]
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ def s3_generate_presigned_post(
|
||||||
Fields={
|
Fields={
|
||||||
"acl": acl,
|
"acl": acl,
|
||||||
"Content-Type": file_type,
|
"Content-Type": file_type,
|
||||||
"Content-Disposition": f"attachment; filename={file_name}",
|
"Content-Disposition": f'attachment; filename="{file_name}"',
|
||||||
},
|
},
|
||||||
Conditions=[
|
Conditions=[
|
||||||
{"acl": acl},
|
{"acl": acl},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue