public ActionResult UploadItemPictures(StoreItemDisplayModel display) { try { foreach (string pictureFile in Request.Files) { HttpPostedFileBase file = Request.Files[pictureFile]; if (file.ContentLength > 0) { StoreGateway sg = new StoreGateway(); sg.AddStoreItemPhoto(display.StoreItemId, file.InputStream, file.FileName); } } } catch (Exception exception) { ErrorDatabaseManager.AddException(exception, exception.GetType()); } return Redirect(Url.Content("~/store/item/edit/" + display.StoreItemId + "/" + display.PrivateManagerId.ToString().Replace("-", "") + "/" + display.MerchantId.ToString().Replace("-", ""))); }