mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
csharp-mvc: add editorConfig.createUrl
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user