main ← feature/web-share-target-files
merged 08:35PM - 18 Jun 26 UTC
Previously, Discourse only registered as a Level 1 Web Share Target — a `GET` te…xt-only handler that could not receive images or other files from the OS share sheet.
This change registers a modern `POST`/`multipart/form-data` share target. The service worker intercepts the incoming share, stashes the shared title, text, url, and files in the Cache API, and redirects to a `share-target` route that opens a modal asking whether to start a new topic, a new message, or save the content to add to the next reply. Topics and messages open the composer pre-filled with the shared text and uploaded files; the reply option buffers the content and injects it into the next reply composer that opens.
### Notes
- The file `accept` list covers images, video, audio, PDFs, and common document types; the server still enforces `authorized_extensions`.
- Adds a `composer:uploader-ready` app event so shared files are only handed to the uploader once it is bound, avoiding a race on cold composer open.
- Only Android Chromium-based browsers currently implement file-capable share targets; iOS has no Web Share Target support.