public void UploadFilesBeforePublish()
            {
                // create a file uploader
                using (BlogFileUploader fileUploader = BlogFileUploader.CreateFileUploader(_blog, _publishingContext.EditingContext.ServerSupportingFileDirectory))
                {
                    // connect to the file uploader
                    fileUploader.Connect();

                    // upload the files and fixup references within the contents of the blog post
                    string htmlContents = _publishingContext.EditingContext.BlogPost.Contents;

                    _referenceFixer = new BlogPostReferenceFixer(htmlContents, _publishingContext);
                    _referenceFixer.Parse();

                    string fixedHtml = HtmlReferenceFixer.FixLocalFileReferences(htmlContents, _referenceFixer.GetFileUploadReferenceFixer(fileUploader));
                    _publishingContext.EditingContext.BlogPost.Contents = fixedHtml;
                }
            }
 public string[] GetSupportingFilesInPost(string postContents)
 {
     _supportingFileScratchList.Clear();
     HtmlReferenceFixer.FixLocalFileReferences(postContents, new ReferenceFixer(EnumerateLocalFileReference));
     return((string[])_supportingFileScratchList.ToArray(typeof(string)));
 }