Skip to content
This repository was archived by the owner on Oct 18, 2018. It is now read-only.

Commit 0f73e35

Browse files
committed
File listing
1 parent aae829a commit 0f73e35

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed
Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
1-
using GroupDocs.Annotation.Domain;
2-
using GroupDocs.Annotation.Domain.Results;
3-
using GroupDocs.Annotation.Handler;
4-
using GroupDocs.Annotation.Handler.Input.DataObjects;
5-
using GroupDocs.Annotation_for.NET.Models;
6-
using Newtonsoft.Json;
7-
using Newtonsoft.Json.Serialization;
8-
using System;
9-
using System.Collections.Generic;
10-
using System.Linq;
11-
using System.Web;
1+
using System.IO;
2+
using System.Collections;
123
using System.Web.Mvc;
134

145
namespace GroupDocs.Annotation_for.NET.Controllers
@@ -21,7 +12,18 @@ public class FilesController : Controller
2112
public ActionResult Get(string file)
2213
{
2314
Response.AddHeader("Content-Type", "application/json");
24-
return Content("[\"Test - Copy.pdf\"]");
15+
DirectoryInfo d = new DirectoryInfo(this.Server.MapPath("~/App_Data/Storage"));
16+
ArrayList result = new ArrayList();
17+
foreach (FileInfo f in d.GetFiles())
18+
{
19+
if (f.Name == "README.txt" || f.Name.StartsWith("GroupDocs.") || f.Name.StartsWith("."))
20+
{
21+
continue;
22+
}
23+
result.Add(f.Name);
24+
}
25+
return Json(result, JsonRequestBehavior.AllowGet);
2526
}
2627
}
2728
}
29+

0 commit comments

Comments
 (0)