public ActionResult Upload(Credentials cr, MachineIdentity mid, DirIdentity did) { try { FileManipulator.AddFile(cr.ToLib(), mid.ToLib(), did.ToLib(), this.ToLib()); } catch (Exception ex) { throw new ActionException("Error occurred while file was uploaded.", ActionType.File, MemeType.Fuuuuu, ex); } return(new ActionResult("File uploaded.", "File was put into the database.", ActionType.File)); }