How to restrict the file size to be uploaded in ODK form

I would like to restrict the size of a file (.pdf, .docx, .xlsx) to be uploaded to 2MB. I know how to restrict image in appearance with max-pixels=720. My problem is what is the syntax to restrict the file size for document upload. Thank you.

I would also like to know if this is possible as I'm about to allow users to add attachments at the end of a form and am worried about potentially massive uncompressed videos etc being added with no thought to bandwidth/hosting costs.

a max-pixels equivalent as max-kb or similar parameter, or a better yet a constraint that allows an error message when exceeded would do the trick if Collect is able to read the file size before it appends