Try our conversational search powered by Generative AI!

Import a file outside of EPiServer Programmatically

Hi, I receive a file outside of EPiServer via ftp. I need to programmatically stream the file into the Unified File System. The file is a spreadsheet so reading line by line would not work. Any ideas would be greatly appreciated
Apr 05, 2007 19:41
There is an example in the SDK on how to do this using the UnifiedDirectory.CreateFile method. UnifiedDirectory dir = UnifiedFileSystem.GetDirectory("/upload"); UnifiedFile file = dir.CreateFile("Myfile.txt"); Stream s = file.OpenWrite(); StreamWriter w = new StreamWriter(s); w.WriteLine("Hello world!"); w.Close(); s.Close(); To enable FTP functionality in .NET applications, try the FtpSupport.dll:
Apr 10, 2007 9:22
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.