Skip to main content

Module content_disposition

Module content_disposition 

Source

Constants§

ALLOWED_INLINE_CONTENT_TYPES 🔒
as defined by MSC2702

Functions§

content_disposition_type
Returns a Content-Disposition of attachment or inline, depending on the Content-Type against MSC2702 list of safe inline Content-Types (ALLOWED_INLINE_CONTENT_TYPES)
make_content_disposition
creates the final Content-Disposition based on whether the filename exists or not, or if a requested filename was specified (media download with filename)
sanitise_filename
sanitises the file name for the Content-Disposition using sanitize_filename crate