Forum Discussion
sameburn
OneStream Employee
1 day agoHi Mikki
Documents/Users in OneStream represents the Application Database e.g.
This means the file is stored in a database table and not a real file path. This is why you are receiving an error trying to use a UNC path. If you search GetFile in snippets you will see this BRApi example
It is not clear what you are trying to do with the file itself. But here is a working example to get the file as bytes from Documents/Users using BRApi's available
Dim folderFullName As XFFolderEx = BRApi.FileSystem.GetFolder(si, FileSystemLocation.ApplicationDatabase, Path.Combine("Documents/Users", StringHelper.RemoveWhiteSpace(si.UserName)))
Dim objXFFileEx As XFFileEx = BRApi.FileSystem.GetFile(si, FileSystemLocation.ApplicationDatabase, Path.Combine(folderFullName.XFFolder.FullName, "YourFileName.csv"), True, True)
Dim fileBytes As Byte() = objXFFileEx.XFFile.ContentFileBytes()
Hope this helps
Sam
Related Content
- 2 years ago