@@ -23,6 +23,13 @@ public AssetsController(IDataService data, IStorageService store)
2323 _store = store ;
2424 }
2525
26+ /// <summary>
27+ /// Get list of assets - user saved images and files
28+ /// </summary>
29+ /// <param name="page">Page number</param>
30+ /// <param name="filter">filterImages or filterAttachments</param>
31+ /// <param name="search">Search term</param>
32+ /// <returns>Model containing collection of assets and Pager object</returns>
2633 [ HttpGet ]
2734 public async Task < AssetsModel > Get ( int page = 1 , string filter = "" , string search = "" )
2835 {
@@ -59,6 +66,13 @@ public async Task<AssetsModel> Get(int page = 1, string filter = "", string sear
5966 } ;
6067 }
6168
69+ /// <summary>
70+ /// Select an asset in the File Manager to include in the post
71+ /// </summary>
72+ /// <param name="type">Type of asset (post cover, logo, avatar or post image/attachment)</param>
73+ /// <param name="asset">Selected asset</param>
74+ /// <param name="post">Post ID</param>
75+ /// <returns>Asset Item</returns>
6276 [ HttpGet ( "pick" ) ]
6377 public async Task < AssetItem > Pick ( string type , string asset , string post )
6478 {
@@ -95,6 +109,11 @@ public async Task<AssetItem> Pick(string type, string asset, string post)
95109 return item . FirstOrDefault ( ) ;
96110 }
97111
112+ /// <summary>
113+ /// Upload file(s) to user data store
114+ /// </summary>
115+ /// <param name="files">Selected files</param>
116+ /// <returns>Success or internal error</returns>
98117 [ HttpPost ( "upload" ) ]
99118 public async Task < IActionResult > Upload ( ICollection < IFormFile > files )
100119 {
@@ -112,6 +131,11 @@ public async Task<IActionResult> Upload(ICollection<IFormFile> files)
112131 }
113132 }
114133
134+ /// <summary>
135+ /// Remove file from user data store, authentication required
136+ /// </summary>
137+ /// <param name="url">Relative URL of the file to remove</param>
138+ /// <returns></returns>
115139 [ HttpDelete ( "remove" ) ]
116140 public IActionResult Remove ( string url )
117141 {
0 commit comments