Forum Discussion
Hi Anusha,
Yes, it is possible to upload data to the file explorer using the REST API.
- I am assuming you have created a connection with the REST API and are able to stream the response in your code.
- You then need to convert your response that into a byte array()
- Create XFFolderEx object.
- Then create XFFileInfo
- then a new instance of XFFile where you pass the file info and your byte array()
- Store that XFFile using BRAPI.FileSystem.InsertOrUpdate(si, fileToSave)
You can go through these APIs to understand this whole thing better I have just given a general overview of how you can do what you're trying to achieve.
Also can you elaborate the bold part "We are working on uploading and downloading files onto OneStream FileExplorer. It is possible to fetch the encoded file from the FileContents using the SQL Query over the REST API."
This whole process is a long complex task to code with a lot of moving pieces really difficult to explain the whole process.
Maybe Anusha is trying to do the REST calls using their database rather than in a BR? Just a guess. If so, this would not be ideal. You can do all this from Business Rules and the .NET languages quite simply and smoothly. Neither WinSCP or SQL are required. I recently did this with Azure/ADLS and it all went very well.
Related Content
- 5 months ago
- 7 months ago
- 12 months ago