discourse/spec
Natalie Tay cfac49fb10
FIX: Include original filename in s3 uploads even if not attachment (#30789)
Related: https://github.com/discourse/discourse/pull/30535

In the PR above, the [content-disposition
header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition)
was removed for all non-svg files due to the "attachment" keyword added
to them, causing files to be downloaded instead of opening in a new tab
when requested. When removing that, it also removed the filename
attribute attached to s3 uploads.

After some testing, it turns out that `filename` is also respected when
next to `inline`, despite it not being obvious [in
docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition#syntax).
This commit adds inline+filename so that users can still download files
and have filenames be respected instead of using the s3 hash.
```http
<!-- mdn docs -->
Content-Disposition: inline
Content-Disposition: attachment
Content-Disposition: attachment; filename="file name.jpg"
Content-Disposition: attachment; filename*=UTF-8''file%20name.jpg
<!-- this actually works too -->
Content-Disposition: inline; filename="file name.jpg"
```
2025-01-15 18:08:18 +08:00
..
fabricators FEATURE: Improve wizard quality and rearrange steps (#30055) 2025-01-02 09:28:23 +10:00
fixtures FIX: S3Inventory#backfill_etags_and_list_missing need to unescape key (#30787) 2025-01-15 14:52:49 +08:00
generator
helpers UX: add color-scheme meta tag to _head (#30245) 2024-12-13 08:10:08 -03:00
import_export
initializers
integration SECURITY: When enabled only allow Discourse Connect logins 2024-12-19 13:13:23 -03:00
integrity
jobs DEV: Fix job serialization warnings (#30735) 2025-01-13 13:35:40 +01:00
lib FIX: Include original filename in s3 uploads even if not attachment (#30789) 2025-01-15 18:08:18 +08:00
mailers FEATURE: add support for One-Click unsubscribe (RFC 8058) 2024-12-31 15:28:59 +01:00
migrations
models FIX: Add Type column to Flag Status CSV export (#30756) 2025-01-14 13:31:55 +10:00
multisite FIX: Include original filename in s3 uploads even if not attachment (#30789) 2025-01-15 18:08:18 +08:00
requests UX: Use DPageHeader on the Emails page (#30781) 2025-01-15 15:36:16 +11:00
script/import_scripts
serializers FIX: ensure GroupChooser works with localized group names (#30593) 2025-01-13 11:29:04 +01:00
services DEV: Add problem check informing about admin layout deprecation (#30685) 2025-01-14 13:22:59 +08:00
support DEV: Remove invalid parsing options (#30545) 2025-01-03 13:17:49 +01:00
system DEV: Move discourse-common/(utils|lib) to discourse/lib (#30733) 2025-01-13 13:02:49 +00:00
tasks
views
rails_helper.rb DEV: Fix flaky deprecated setting specs (#30550) 2025-01-04 12:55:22 +01:00
regenerate_swagger_docs
swagger_helper.rb