public ActionResult UploadFilesByPlanetId(int planetId)
 {
     IPlanetRepo pr = new PlanetRepo();
     var files = Request.Files.AllKeys.Select(fileName => Request.Files[fileName]).Where(file => file.ContentLength > 0).ToList();
     PlanetViewModel pvm = pr.GetById(planetId);
     if (User.Identity.Name != pvm.Uploader) return Json(new {Message = "You are not the original uploader of this Planet."});
     foreach (var file in files)
     {
         var fileName = Guid.NewGuid() + Path.GetExtension(file.FileName);
         var virtualPath = "~/Content/img/" + DateTime.Today.ToString("MMddyyyy");
         var subPath = Server.MapPath(virtualPath);
         if (!Directory.Exists(subPath))
         {
             Directory.CreateDirectory(subPath);
         }
         var path = Path.Combine(subPath, fileName);
         try
         {
             file.SaveAs(path);
         }
         catch (Exception e)
         {
             continue;
         }
         IFileSystemRepo fsr = new FileSystemRepo();
         fsr.SaveFileDataByPlanetId(
             Path.Combine(virtualPath.Replace("~/", "/").Replace("\\\\", "/"), fileName), fileName, planetId);
     }
     return Json(new { Message = string.Empty });
 }