w3c / web-share-target

Web API proposal for receiving shared data
https://w3c.github.io/web-share-target/
Other
191 stars 20 forks source link

Share binary data #29

Closed FluorescentHallucinogen closed 5 years ago

FluorescentHallucinogen commented 6 years ago

Is it possible to receive binary data (e.g. image file) using this API? If yes, how? Or only text data is supported?

E.g. user adds SVGOMG PWA (https://jakearchibald.github.io/svgomg/) to the home screen using Chrome on Android and want to open *.svg files using the installed WebAPK.

josephfrazier commented 6 years ago

I'm also interested in this. A potential implementation could simply use a data URL as the url value, right?

ewilligers commented 6 years ago

53 describes how we propose to share files: POST requests with multipart/form-data.

This won't be in the initial version.

josephfrazier commented 6 years ago

Thanks for the update, @ewilligers! I'll follow along over there

mgiuca commented 5 years ago

This is now supported in the Level 2 spec: https://wicg.github.io/web-share-target/level-2/

It's being implemented in Chrome (not rolled out yet) but the spec side is done.