Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion WOPIHostCode/WOPIHost/Controllers/HostPageController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Web.Mvc;
using System.Web.Script.Serialization;
using WOPIHost.Models;
using System.IO;

namespace WOPIHost.Controllers
{
Expand Down Expand Up @@ -39,9 +40,14 @@ public List<FileLink> GetFiles()

foreach (string fileName in fileNames)
{
string ext = string.Empty;
FileLink fileLink = new FileLink();
fileLink.Name = fileName;
if (fileName == ".wopitest")
if (Path.HasExtension(fileName))
ext = Path.GetExtension(fileName);

// WOPI Validator now requires the wopi test file to have a filename, "." and the "wopitest" extenstion.
if ( (!string.IsNullOrEmpty(ext)) && (ext == ".wopitest"))
{
fileLink.Url = string.Format("http://{0}/WopiValidator/Index/{1}",
ConfigurationManager.AppSettings["WOPIServerName"],
Expand Down