The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
Sergey
OneStream Employee
3 years agoSaveFileBytesToUserTempFolder returning an error message
Hi,
I am trying to use the Business Rule API "SaveFileBytesToUserTempFolder" in order to open a file stored as a byte in a datatable.
This is exactly like in the "Reporting Compliance" dashboard,...
NicolasArgente
3 years agoValued Contributor
Hi Sergey!
Have you tried browsing to http://localhost:50002/OneStreamApp/SVC/XFFileSystem.svc you might find more info.
Also did you check that the extension is on the filename? My understanding is that the fileBytes is already good on your side? Have you tested it? for example using https://base64.guru/converter/decode/file
Or Have you tried with the exact same base64 (byte) than with the other file or see if there is a difference? Have you hard coded the fileName instead to "test.csv" or "test.xls" depending on the filetype?
'Export Register
Dim fileName As String = "Register.csv"
'Export CSV to User Temp Folder
Dim csv As String = Me.CreateRegisterTableCSVText(si, profileName, scenarioName, timeName).ToString
Dim fileBytes As Byte() = Encoding.UTF8.GetBytes(csv)
BRApi.Utilities.SaveFileBytesToUserTempFolder(si, si.UserName, fileName, fileBytes)
Related Content
- 2 months ago
- 2 years ago
- 3 years ago