


I'm trying to prevent an edge case when somebody performs a POST request against my API UploadAppraisalFile endpoint and suddenly loses an internet connection which would result in sending a request with not the full file content. Return StatusCode(StatusCodes.Status411LengthRequired, "Complete-File-Size header doesn't much received byteArray size") Logger.LogDebug("Complete-File-Size header doesn't much received byteArray size", file.Length, completeFileSize, inputAsString) Var inputAsString = Convert.ToBase64String(stream.ToArray())

If (file = null || file.Length != completeFileSize) Int.TryParse(completeFileSizeHeader, out int completeFileSize) Var completeFileSizeHeader = Request.Headers intermitent code change to investigate and validate Complete File Size and Actual File Size Public async Task UploadAppraisalFile(int appraisalID, string fileSubjectCode, IFormFile file)įile = file ?.FirstOrDefault() Please try to upload images/videos of a specific aspect ratio File upload *Only PDF, MP4, WEBM, OGG, JPG, JPEG, & PNG files are allowed.
