Exemplo n.º 1
0
        public object EditFileContentOnPost(PostAddress postAddress, FileAddress fileAddress, FileContentInput fileInput, string returnUri)
        {
            Post post = postService.GetPost(postAddress);

            if (post == null)
            {
                return(null);
            }

            File file = fileService.GetFile(post, fileAddress);

            if (file == null)
            {
                return(null);
            }

            return(saveFileToPost(postAddress, () => editFileContent(post, file, fileInput), returnUri));
        }
Exemplo n.º 2
0
        public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
        {
            string url = controllerContext.HttpContext.Request.Form["existingFileUrl"];

            return(fileService.GetFile(url));
        }