\BlogEngine.NET\AppCode\Api\UploadController.cs line 19

Feb 2, 2014 at 5:13 PM
HttpPostedFile file = HttpContext.Current.Request.Files[0];

Arrays need to check before using.

HttpPostedFile file = null;
if (HttpContext.Current.Request.Files.Count > 0) file = HttpContext.Current.Request.Files[0];