Forum Discussion
Hey Tom,
Remember the Application Database repository is not an actual filesystem. Could you post the parts of your code that deal with retrieving files and zipping them, so we can figure out where the problem might be?
- Tom_R2 years agoNew Contributor III
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
- JackLacava2 years agoHonored Contributor
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