Forum Discussion
Hi Jack,
I don't really have code samples. I have been trying to mimic the two samples provided in the Pick-a-csv-file-stored-in-the-DM-Export-in-Filestore-and-covert ticket. Neither option there has worked for me. We don't have Zipfile available as part of the system.io, and the XFZip file method is always looking for a folder on the local c:\ which doesn't exist.
Thanks,
Tom
Ok, one thing at a time...
First, you should be able to use those .Net libraries, but you have to reference the actual dlls in the rule Properties (and I don't think you'll get any Intellisense support). Here's an example, you might have to ask Support for actual values for your environment:
Second, the "Application Database" repository is not a real filesystem, but a virtual one that is actually kept in the database. To access files in there, you can use the technique showed here (changing the path): https://community.onestreamsoftware.com/t5/Rules/Documents-Public-location/m-p/13338
Once you have the XFileEx object returned by GetFile, you should be able to retrieve the actual contents as a Byte() array with yourObject.XFile.ContentFileBytes. You can then save that to a physical directory, or (I think) directly with the ZipFile stuff.
Unfortunately this week I cannot put together a sample, maybe someone else will be able to.
Related Content
- 6 months ago
- 2 years ago