public async Task<ActionResult> Create(FileEditModelSync model)
        {
            if (model.File == null)
                ModelState.AddModelError("", "There was an error uploading your resource, please try again");
            
            if (ModelState.IsValid)
            {
                if (model.File != null)
                {
                    var result = await UploadAsync(model.File, Constants.DocsContainer, Constants.SharedResources);

                    if (!result.Success)
                    {
                        ModelState.AddModelError("", "There was an error trying to save the resource, please try again in a few seconds");
                        return View(model);
                    }
                    model.Path = result.Path;
                }

                _viewRepository.Insert(model);
                return RedirectToAction("Index");
            }

            var rebuilt = _modelBuilder.BuildModel(model);
            return View(rebuilt);
        }
        public async Task<ActionResult> Edit(FileEditModelSync model)
        {
            if (ModelState.IsValid)
            {
                if (model.File != null)
                {
                    var result = await UploadAsync(model.File, Constants.DocsContainer, Constants.SharedResources);
                    model.Path = result.Path;
                }

                _viewRepository.Update(model);
                return RedirectToAction("Index");
            }

            var rebuilt = _modelBuilder.BuildModel(model);
            return View(rebuilt);
        }