We should move this logic to `AbstractFileUpload`