diff --git a/.gitmodules b/.gitmodules index ea03c04b..3a2744ed 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,10 +2,6 @@ path = web/documentserver-example/csharp-mvc/assets url = https://github.com/ONLYOFFICE/document-templates branch = main/en -[submodule "web/documentserver-example/csharp/assets"] - path = web/documentserver-example/csharp/assets - url = https://github.com/ONLYOFFICE/document-templates - branch = main/en [submodule "web/documentserver-example/nodejs/public/assets/document-templates"] path = web/documentserver-example/nodejs/public/assets/document-templates url = https://github.com/ONLYOFFICE/document-templates @@ -54,3 +50,7 @@ path = web/documentserver-example/java-spring/src/main/resources/assets/document-formats url = https://github.com/ONLYOFFICE/document-formats branch = master +[submodule "web/documentserver-example/csharp/assets/document-templates"] + path = web/documentserver-example/csharp/assets/document-templates + url = https://github.com/ONLYOFFICE/document-templates + branch = main/en diff --git a/web/documentserver-example/csharp/DocEditor.aspx.cs b/web/documentserver-example/csharp/DocEditor.aspx.cs index 2184c411..8fc1e540 100755 --- a/web/documentserver-example/csharp/DocEditor.aspx.cs +++ b/web/documentserver-example/csharp/DocEditor.aspx.cs @@ -489,7 +489,7 @@ namespace OnlineEditorsExample return; } var demoName = (string.IsNullOrEmpty(sample) ? "new" : "sample") + ext; // create demo document name with the necessary extension - var demoPath = "assets\\" + (string.IsNullOrEmpty(sample) ? "new\\" : "sample\\"); // and put this file into the assets directory + var demoPath = "assets\\document-templates\\" + (string.IsNullOrEmpty(sample) ? "new\\" : "sample\\"); // and put this file into the assets directory FileName = _Default.GetCorrectName(demoName); // get file name with an index if such a file name already exists diff --git a/web/documentserver-example/csharp/WebEditor.ashx.cs b/web/documentserver-example/csharp/WebEditor.ashx.cs index 2b2a7592..ed1fad98 100644 --- a/web/documentserver-example/csharp/WebEditor.ashx.cs +++ b/web/documentserver-example/csharp/WebEditor.ashx.cs @@ -275,7 +275,7 @@ namespace OnlineEditorsExample private static void Assets(HttpContext context) { var fileName = Path.GetFileName(context.Request["filename"]); - var filePath = HttpRuntime.AppDomainAppPath + "assets/sample/" + fileName; + var filePath = HttpRuntime.AppDomainAppPath + "assets/document-templates/sample/" + fileName; download(filePath, context); } @@ -283,7 +283,7 @@ namespace OnlineEditorsExample private static void GetCsv(HttpContext context) { var fileName = "csv.csv"; - var filePath = HttpRuntime.AppDomainAppPath + "assets/sample/" + fileName; + var filePath = HttpRuntime.AppDomainAppPath + "assets/document-templates/sample/" + fileName; download(filePath, context); } diff --git a/web/documentserver-example/csharp/assets b/web/documentserver-example/csharp/assets/document-templates similarity index 100% rename from web/documentserver-example/csharp/assets rename to web/documentserver-example/csharp/assets/document-templates