Proprietary File Formats  Topic is solved

Discussions relating to the REST API of Jiwa 7.

Proprietary File Formats

Postby SBarnes » Mon Dec 02, 2019 3:07 pm

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?
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Proprietary File Formats  Topic is solved

Postby Mike.Sheen » Tue Dec 03, 2019 9:47 am

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.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: Proprietary File Formats

Postby SBarnes » Wed Jan 20, 2021 6:17 pm

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.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1617
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175


Return to REST API

Who is online

Users browsing this forum: No registered users and 1 guest

cron