Currently, if you want to return a file from a service, you have to use a redirect or read the file yourself. If invoke_service returned cherrypy.lib.file_generator instances directly, then you could return a file via return cherrypy.lib.static.serve_file(path, content_type=mime_type), which would be cleaner than using a 302 or 307 redirect. This should be a one line change, but then tests would need to be added.
I'd like to handle this similarly to redirects. Something like return tangelo.file("/path/to/file", content_type=..., disposition=..., name=...), which would then do the right thing.
Currently, if you want to return a file from a service, you have to use a redirect or read the file yourself. If
invoke_service
returnedcherrypy.lib.file_generator
instances directly, then you could return a file viareturn cherrypy.lib.static.serve_file(path, content_type=mime_type)
, which would be cleaner than using a 302 or 307 redirect. This should be a one line change, but then tests would need to be added.