Re: [w3ctag/design-reviews] Web Share Target API (#221)

Summary of 2018-02-27 discussion with @mgiuca @ewilligers @slightlyoff @dbaron :

We should add non-normative text encouraging user agents to require a service worker, to create a reliable user experience.

Instead of template substitution into a URL, consider using GET/POST form submissions. The application's desired field names could be specified in the manifest. Binary blobs would only be permitted with POST submissions, and the manifest could specify the accepted MIME types. Applications can use Request.formData to read everything out of the POST easily. Syntax might resemble


```
 {
     "name": "Includinator",
     "share_target": {
         "action": "share.html",
         "method": "POST",
         // Keys are the official field names. Values are the parameter names in the target URL.
         "params": {"title": "mytitle", "text": "mytext", "url": "myurl", "file": ["thephoto", ["image/*", "video/*"]], "file": ["ics_file", "application/ics"]},
     }
 }

```

This requires more investigation. Does formData block until everything is read and create an in-memory copy of everything? How might streaming be supported? We need to review again after we have a sample application the shares a URL and a sample application that shares multiple images and videos.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/221#issuecomment-376717885

Received on Wednesday, 28 March 2018 00:21:40 UTC