Skip to content

Commit 3fccfd1

Browse files
authored
Mention plan for sharing files (#65)
* Mention plan for sharing files Web share tagets will be able to specify in their manifests which MIME types they accept. * registerProtocalHandler is not being used * Link to https://github.com/WICG/web-share
1 parent 5279a5a commit 3fccfd1

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

docs/explainer.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ shared data from other sites or apps. Many modern operating systems have a
88
The goal is to allow web apps to appear in the UI for picking an app to share
99
to.
1010

11-
In combination with the [Web Share API](https://github.com/mgiuca/web-share)
11+
In combination with the [Web Share API](https://github.com/WICG/web-share)
1212
(being proposed in parallel), this would allow cross-sharing between websites on
1313
any platform (even those without a native sharing system).
1414

@@ -56,7 +56,7 @@ underlying system, as explored in the next section.
5656
### Sharing from web to web on mobile
5757

5858
Here we see the interaction between the [Web Share
59-
API](https://github.com/mgiuca/web-share) and the Share Target API. You could
59+
API](https://github.com/WICG/web-share) and the Share Target API. You could
6060
also share from a native app (depending on the system).
6161

6262
![Share on mobile: web to web](mocks/share_mobile_web_web.png)
@@ -96,6 +96,10 @@ At least on Android, the web apps will be badged with the browser's icon.
9696
For more technical details on integrating with native apps, see [Native
9797
Integration Story](native.md).
9898

99+
Users may wish to share photos and other files, not just links. We aim
100+
to support this in the future, with web share targets able to specify
101+
in their manifests which MIME types they accept.
102+
99103
## Sample code
100104

101105
Here's how to register a website to appear in the list of apps that can handle a
@@ -161,11 +165,11 @@ native apps.
161165
### Why not use registerProtocolHandler?
162166

163167
This is discussed at length in the [Web Share
164-
Explainer](https://github.com/mgiuca/web-share/blob/master/docs/explainer.md),
165-
and depends on the outcome of that decision. If we use a URI scheme for Share
166-
(instead of an API), then it would make sense to use the existing
168+
Explainer](https://github.com/WICG/web-share/blob/master/docs/explainer.md#user-content-why-not-make-a-share-uri-scheme-like-mailto-instead-of-a-javascript-api).
169+
If we used a URI scheme for Share (instead of an API), then it would make sense
170+
to use the existing
167171
[registerProtocolHandler](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler)
168172
API to let websites receive shares.
169173

170174
However, there are a number of downsides to this approach, discussed in the
171-
other document. This is an open question.
175+
other document.

docs/native.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This document is an informal and incomplete survey of various operating systems'
66
share systems, for exploring how a user agent might automatically map the [Share
77
Target API](explainer.md) into the native system. See also: [Share API Native
88
Integration
9-
Survey](https://github.com/mgiuca/web-share/blob/master/docs/native.md).
9+
Survey](https://github.com/WICG/web-share/blob/master/docs/native.md).
1010

1111
*Note:* I ([email protected]) am not very familiar with these details. I
1212
gathered this information from reading the online documentation and
@@ -69,7 +69,7 @@ APIs. I would appreciate being informed of any errors.
6969
## Summary
7070

7171
Unlike the web-to-native sharing (in the [Share
72-
API](https://github.com/mgiuca/web-share), which is generally pretty
72+
API](https://github.com/WICG/web-share), which is generally pretty
7373
straightforward to route into a system share, native-to-web is usually hard or
7474
impossible for one reason: operating systems don't like letting one application
7575
dynamically register multiple handlers for things (with the notable exception of
@@ -81,4 +81,4 @@ On these platforms, implementations have two non-ideal options:
8181
1. Declare the browser itself as a system share target, then have users pick the
8282
browser, and display a sub-picker within the browser for web apps, or
8383
2. Only support web-to-web sharing (showing a picker within the browser when a
84-
website uses the [Share API](https://github.com/mgiuca/web-share)).
84+
website uses the [Share API](https://github.com/WICG/web-share)).

0 commit comments

Comments
 (0)