mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
csharp-mvc: word, cell, slide instead text, spreadsheet, presentation
This commit is contained in:
@ -25,20 +25,20 @@ namespace OnlineEditorsExampleMVC.Models
|
||||
{
|
||||
public enum FileType
|
||||
{
|
||||
Text,
|
||||
Spreadsheet,
|
||||
Presentation
|
||||
Word,
|
||||
Cell,
|
||||
Slide
|
||||
}
|
||||
|
||||
public static FileType GetFileType(string fileName)
|
||||
{
|
||||
var ext = Path.GetExtension(fileName).ToLower();
|
||||
|
||||
if (ExtsDocument.Contains(ext)) return FileType.Text;
|
||||
if (ExtsSpreadsheet.Contains(ext)) return FileType.Spreadsheet;
|
||||
if (ExtsPresentation.Contains(ext)) return FileType.Presentation;
|
||||
if (ExtsDocument.Contains(ext)) return FileType.Word;
|
||||
if (ExtsSpreadsheet.Contains(ext)) return FileType.Cell;
|
||||
if (ExtsPresentation.Contains(ext)) return FileType.Slide;
|
||||
|
||||
return FileType.Text;
|
||||
return FileType.Word;
|
||||
}
|
||||
|
||||
public static readonly List<string> ExtsDocument = new List<string>
|
||||
|
||||
Reference in New Issue
Block a user