Skip to content

Commit

Permalink
Unify filename size limit (#2414)
Browse files Browse the repository at this point in the history
- The filename property is now limited to a 255 char length for both 'link' and 'attach' file sending via the V2 api.
  • Loading branch information
whabanks authored Jan 13, 2025
1 parent 981681f commit 429d2f7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/schema_validation/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@
"binaryEncoding": "base64",
},
"sending_method": {"type": "string", "enum": ["attach", "link"]},
"filename": {"minLength": 3, "maxLength": 255},
},
"required": ["file", "sending_method"],
"if": {"properties": {"sending_method": {"const": "attach"}}},
"then": {
"required": ["filename"],
"properties": {"filename": {"minLength": 3, "maxLength": 255}},
},
"then": {"required": ["filename"]},
}
},
}
Expand Down

0 comments on commit 429d2f7

Please sign in to comment.