public object AddFileContentToPost(PostAddress postAddress, FileContentInput fileInput, string returnUri)
        {
            Post post = postService.GetPost(postAddress);

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

            return(saveFileToPost(postAddress, () => addFileContent(post, fileInput), returnUri));
        }
Beispiel #2
0
        public ActionResult AddFileContentToPost(PostAddress postAddress, FileContentInput fileInput, string returnUri)
        {
            Post post = postService.GetPost(postAddress);

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

            //TODO: (erikpo) Save file to disc if possible

            if (!string.IsNullOrEmpty(returnUri))
            {
                return(new RedirectResult(returnUri));
            }
            else
            {
                return(PartialView("VIEWNAME"));
            }
        }
Beispiel #3
0
 public ModelResult <File> EditFile(ScheduleItem scheduleItem, File fileToEdit, FileContentInput fileInput)
 {
     throw new System.NotImplementedException();
 }
        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));
        }
        private ModelResult <File> editFileContent(Post post, File file, FileContentInput fileInput)
        {
            //TODO: (erikpo) Edit file on the file system if possible

            return(fileService.EditFile(post, file, fileInput));
        }
        private ModelResult <File> addFileContent(Post post, FileContentInput fileInput)
        {
            //TODO: (erikpo) Add file to the file system if possible

            return(fileService.AddFile(post, fileInput));
        }
 public ModelResult <File> AddFile(Post post, FileContentInput fileInput)
 {
     throw new System.NotImplementedException();
 }
Beispiel #8
0
 public object EditFileContentOnPost(Post post, File file, FileContentInput fileInput, string returnUri)
 {
     return(saveFileToPost(post, () => editFileContent(post, file, fileInput), returnUri));
 }
Beispiel #9
0
 public object AddFileContentToPost(Post post, FileContentInput fileInput, string returnUri)
 {
     return(saveFileToPost(post, () => addFileContent(post, fileInput), returnUri));
 }