Thank you Nicolas. I've modified the code to work in my situation and it runs without errors. However I never see the document in the specified library.
While debugging, I can see that most of the properties look correct, however the FilePath property is incorrect. It shows the library name followed by the extension and does not show the file name.
I've enumerated other files in the library and their FilePath look correct.
I've set the Title and can see that it is valid.
I can also see that the Uploaded property is True after executing line 20 below. I think its getting uploaded, but without the file name, the interface won't display the document.
Here's the code that's running:
(Stream docStream = ResumeUploadFU.FileContent)
Stream customStream =
docToAttach = LibrariesManager.GetManager().CreateDocument();
DocumentLibrary resumesLibrary = LibrariesManager.GetManager().GetDocumentLibrary(Guid.Parse(DocumentLibraryGUID));
docToAttach.Parent = resumesLibrary;
docToAttach.Title = ResumeUploadPostBackTB.Text.Replace(
docToAttach.Extension = ResumeUploadFU.FileName.Substring(ResumeUploadFU.FileName.IndexOf(
LibrariesManager manager = LibrariesManager.GetManager();
manager.Upload(docToAttach, customStream, docToAttach.Extension);