This repository was archived by the owner on Oct 18, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed
GroupDocs.Annotation for .NET/Controllers Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change 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 ;
12
3
using System . Web . Mvc ;
13
4
14
5
namespace GroupDocs . Annotation_for . NET . Controllers
@@ -21,7 +12,18 @@ public class FilesController : Controller
21
12
public ActionResult Get ( string file )
22
13
{
23
14
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 ) ;
25
26
}
26
27
}
27
28
}
29
+
You can’t perform that action at this time.
0 commit comments