mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
Add some breathing room to file name length limit
Because Amazon stores metadata keys prefixed with `x-amz-` which might get counted as part of the size.
This commit is contained in:
@@ -558,7 +558,7 @@ def _check_messages(service_id, template_id, upload_id, preview_row, letters_as_
|
|||||||
valid=True,
|
valid=True,
|
||||||
original_file_name=unicode_truncate(
|
original_file_name=unicode_truncate(
|
||||||
request.args.get('original_file_name', ''),
|
request.args.get('original_file_name', ''),
|
||||||
1872
|
1600,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -700,7 +700,7 @@ def test_file_name_truncated_to_fit_in_s3_metadata(
|
|||||||
assert sys.getsizeof(''.join((
|
assert sys.getsizeof(''.join((
|
||||||
'{}{}'.format(key, value) for key, value in
|
'{}{}'.format(key, value) for key, value in
|
||||||
mock_s3_set_metadata.call_args_list[0][1].items()
|
mock_s3_set_metadata.call_args_list[0][1].items()
|
||||||
)).encode('utf-8')) == 1998
|
)).encode('utf-8')) == 1724
|
||||||
|
|
||||||
|
|
||||||
def test_show_all_columns_if_there_are_duplicate_recipient_columns(
|
def test_show_all_columns_if_there_are_duplicate_recipient_columns(
|
||||||
|
|||||||
Reference in New Issue
Block a user