Closed Jaymon closed 7 years ago
that would automatically set content type and size headers? This feels better to me than having to do this in the controller:
self.response.set_header("Content-Type", MimeType.find_type(filepath)) self.response.set_header("Content-Length", os.path.getsize(filepath)) return open(filepath, "rb")
I would rather just do:
return File(filepath, "rb")
and have endpoints automatically figure everything out and set the correct headers
that would automatically set content type and size headers? This feels better to me than having to do this in the controller:
I would rather just do:
and have endpoints automatically figure everything out and set the correct headers