LPS-51162 Move file size validation to a wrapper so we can have repositories with different file size limitations