Exemple #1
0
        public ActionResult SaveMenu(string menuUrl)
        {
            var businessInfoId = _businessService.GetBusinessInfoByEmail(User.Identity.Name).Id;

            if (string.IsNullOrEmpty(menuUrl))
            {
                if (Request.Files.Count > 0)
                {
                    var file = Request.Files[0];

                    if (file != null && file.ContentLength > 0)
                    {
                        menuUrl = _azureStorageService.UploadToBlobStorage(file, businessInfoId);
                    }
                }
            }
            _businessService.UpdateMenuUrl(businessInfoId, menuUrl);
            return(RedirectToAction("Index"));
        }