private string ProcessUploadedVideo() { string uniqueFileName = null; if (Gif != null) { string uploadsFolder = Path.Combine(hostEnvironment.WebRootPath, "Videos"); uniqueFileName = Guid.NewGuid().ToString() + "_" + Gif.FileName; string filePath = Path.Combine(uploadsFolder, uniqueFileName); using (var fileStream = new FileStream(filePath, FileMode.Create)) { Gif.CopyTo(fileStream); } } return(uniqueFileName); }