We can process the user's input filename. You can use filePath.Replace("..", "")
before using the filePath to access the filesystem.
Var filePath= Path.Combine(contentRootPath, fileName);
filePath = filePath.Replace("..", "");
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best Regards,
Jason