I would like to remove the underscore and make sure the file name is lowercase before the file is saved to the disk. Something like this
Where do I have to put this code to accomplish this? ProceesStream seems to late, GetTargetFolder seems the wrong place?
//Returns the file name and extension of the specified path string.
string fileName = System.IO.Path.GetFileName(FileUploadAddPhotoToPost.FileName);
string fileNameRemoveHTMLEncoding = HttpUtility.UrlDecode(fileName);
string fileNameReplaceToLower = fileNameRemoveHTMLEncoding.Replace(" ", "_").ToLower();
//Assembles entire physical path(including filename) to store images.
string fullPath = System.IO.Path.Combine(physicalFilePath, fileNameReplaceToLower);
Where do I have to put this code to accomplish this? ProceesStream seems to late, GetTargetFolder seems the wrong place?