Skip to content

Commit

Permalink
Merge branch 'dev' into 'main'
Browse files Browse the repository at this point in the history
chore: Increase limit size to 25MB

See merge request locker/maily!7
  • Loading branch information
khaitranquang committed Jan 24, 2024
2 parents b727eea + 5ef5c0b commit 01ac0ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/maily/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ def get_text_html_attachments(self):
bucket, object_key = self.get_bucket_and_key_from_s3_json()
try:
message_content = s3_client.get_message_content_from_s3(bucket, object_key)
if len(message_content) > 10485760:
# Limit size is 25MB
if len(message_content) > 26214400:
return self.response(400, "Attachments are larger than AWS allows")
except ClientError as e:
if e.response["Error"].get("Code", "") == "NoSuchKey":
Expand Down

0 comments on commit 01ac0ac

Please sign in to comment.