discourse/spec/multisite
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
..
distributed_cache_spec.rb DEV: Improve distributed cache multisite specs (#30662) 2025-01-13 17:03:56 +11:00
flags_spec.rb FIX: do not memoize score types (#30657) 2025-01-09 13:20:59 +11:00
hashtag_autocomplete_service_spec.rb
jobs_spec.rb FEATURE: allow admins to enable announced experimental features (#29244) 2024-10-22 10:56:58 +11:00
pausable_multisite_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
post_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
request_tracker_spec.rb DEV: API to register custom request rate limiting conditions (#30239) 2024-12-23 09:57:18 +08:00
s3_store_spec.rb FIX: Include original filename in s3 uploads even if not attachment (#30789) 2025-01-15 18:08:18 +08:00
site_settings_spec.rb DEV: Add plugin hook for transforming site setting defaults (#20941) 2023-04-05 12:28:16 +01:00