Page 1 of 1

Proprietary File Formats

PostPosted: Mon Dec 02, 2019 3:07 pm
by SBarnes
Ok if you wait long enough you will eventually get asked everything to do with the web api :D

I have now been asked is it possible to return a proprietary format, that by the sounds of what has been described to me is not dissimilar to an ABA file in that fields are padded with spaces to a given size.

My initial thought was to return some sort of stream through an HTTPResult but then I discovered this https://docs.servicestack.net/virtual-file-system and given that the file has to be used internally as well as externally letting a scheduled plugin produce the file to disk and then simply point to a directory on disk through the service might make life easier.

Is there anything that could stop this working through the api?

Re: Proprietary File Formats  Topic is solved

PostPosted: Tue Dec 03, 2019 9:47 am
by Mike.Sheen
SBarnes wrote:I have now been asked is it possible to return a proprietary format, that by the sounds of what has been described to me is not dissimilar to an ABA file in that fields are padded with spaces to a given size.

My initial thought was to return some sort of stream through an HTTPResult but then I discovered this https://docs.servicestack.net/virtual-file-system and given that the file has to be used internally as well as externally letting a scheduled plugin produce the file to disk and then simply point to a directory on disk through the service might make life easier.

Is there anything that could stop this working through the api?


I'm not aware of anything which would prevent you using the VFS functionality.

If there are any issues, then just returning a string or byte array would surely work also.

Re: Proprietary File Formats

PostPosted: Wed Jan 20, 2021 6:17 pm
by SBarnes
Hi Mike,

VFS works with the API however the directory must exist otherwise the self hosted service fails to start, not just that plugin, so for anyone's benefit who is going to use it you need a check that the directory exists.