I created a simple IFormFile size validation attribute:
IFormFile
public class MaxFileSizeAttribute : ValidationAttr