Private media exports: fixing wrong filenames and browser-opened PDF and CSV files
The article argues that private export downloads should rely on stored Content-Type and Content-Disposition metadata rather than making files public. A browser opening a PDF or CSV inline usually signals a missing or incorrect response header, not a reason to expose the object. The author separates the internal storage key, which marks an isolation boundary, from the customer-facing filename, which is presentation only. It recommends that the signing service check tenant ownership before creating a short-lived presigned link, since a valid signature alone does not establish business authorization. The piece also proposes deriving the media type from the generated file and building attachment headers with an ASCII fallback plus a UTF-8 encoded filename.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in