csharp-mvc: add editorConfig.createUrl

This commit is contained in:
Alexandr Fedorov
2021-04-18 18:10:29 +03:00
parent 9332035b33
commit b417633c3f
2 changed files with 19 additions and 0 deletions

View File

@ -241,6 +241,19 @@ namespace OnlineEditorsExampleMVC.Helpers
return callbackUrl.ToString();
}
public static string GetCreateUrl(FileUtility.FileType fileType)
{
var createUrl = new UriBuilder(GetServerUrl(false))
{
Path =
HttpRuntime.AppDomainAppVirtualPath
+ (HttpRuntime.AppDomainAppVirtualPath.EndsWith("/") ? "" : "/")
+ "Sample",
Query = "fileExt=" + DocManagerHelper.GetInternalExtension(fileType).Trim('.')
};
return createUrl.ToString();
}
public static string GetInternalExtension(FileUtility.FileType fileType)
{
switch (fileType)