csharp-mvc: check filename from url

This commit is contained in:
Alexandr Fedorov
2021-02-05 13:29:08 +03:00
parent 856613d644
commit b76c532569
3 changed files with 8 additions and 7 deletions

View File

@ -16,6 +16,7 @@
*
*/
using System.IO;
using System.Web.Mvc;
using OnlineEditorsExampleMVC.Helpers;
using OnlineEditorsExampleMVC.Models;
@ -35,7 +36,7 @@ namespace OnlineEditorsExampleMVC.Controllers
{
Mode = editorsMode,
Type = editorsType,
FileName = fileName
FileName = Path.GetFileName(fileName)
};
return View("Editor", file);