I am planning a RESTful API and I am wondering the best way to serve files / bundles of files across the api.
I may be missing something, but as I see it my options are:
Base64_encode
the files and serve within the JSON response- Provide links to files from within the JSON response.
I also need to bear in mind that some of these files need private and only served after successful authentication.
I have also looked at mod_xsendfile
implementations briefly and wonder if this is a route I should be considering.