While it's very easy to mark the response content as a downloadable file using resp.downloadable_as, this sets the Content-Disposition header assuming attachment disposition.
In some cases, such as a PDF document meant to be viewed inline, this is not optimal. The user could format the header on their own, but then they would have to reimplement resp.downloadable_as's machinery for encoding non-ASCII filenames as per RFC 6266 recommendations.
(As requested by @Pachada on Gitter.)
While it's very easy to mark the response content as a downloadable file using
resp.downloadable_as
, this sets theContent-Disposition
header assumingattachment
disposition.In some cases, such as a PDF document meant to be viewed
inline
, this is not optimal. The user could format the header on their own, but then they would have to reimplementresp.downloadable_as
's machinery for encoding non-ASCII filenames as per RFC 6266 recommendations.