Publishing REST service that returns a file

0
Hi all, I've been going through the Mendix REST Services module documentation on Github, and I'm presently looking at the sending and receiving files section. I'm not quite understanding somethings here and I'm wondering if anyone can help me out please. I'm trying to create a service that returns data on events including the event flyer. So, the events entity that holds the actual data inherits from System.Image. The documentation for the module indicates that [i]f the return type of a microflow service is a filedocument, the binary contents is streamed in raw format to the consumer, using Content-Type: application/octet-stream. The problem is, I want to return all the data at once (including the flyer), not just the flyer only. I can't return a transient object because those objects can't be specializations and they can't hold binary data. Is there a way for me to accomplish my task in the way I outlined? Would I have to build a separate service that gets the flyer for each event? How can I get this done? On a similar note, perhaps there's a way I can return the URL of the event flyer? Only problem is I don't know how to access/view the URL that Mendix generates for images. Thanks in advanced!
asked
1 answers
1

You could send the flyer as Base64 data with the JSON.

answered