Open autonome opened 3 years ago
@rafaelramalho19 can you please take this one when you are done with translation?
Quick thoughts:
#share:{data}
. Success depends on the type of shared data:
note-{timestamp}.txt
or somethingfetch
, read bytes from fetched body (if possible due to CORS etc) and import to IPFS on the fly#fragment
, we don't have POST /api/v0/add
exposed anywhereTLDR worth exploring, but requires more analysis and time than we have this week, I advise against shipping suboptimal experience too fast.
Before we go into this rabbit home, we should add basic PWA manifest, so people can install share.ipfs.io as an icon on their phone. I created https://github.com/ipfs-shipyard/ipfs-share-files/issues/108 for tracking PWA support.
Makes sense. @rafaelramalho19 if you're able to work on #108 instead, that would be good.
@lidel correct me if I'm wrong, but we can actually upload files in the webapp. Read https://web.dev/web-share-target/#processing-post-shares
@rafaelramalho19 that is possible only if user runs local IPFS node (eg. IPFS Desktop) that exposes http://localhost:5001/api/v0/add(
POST` endpoint)
Mobile users won't have that, and share.ipfs.io will use js-ipfs node embedded on the page itself, so they won't have localhost endpoint.
Couldn't allow this on my phone (Android Samsung S8) 😢
Going to move this out of the hack week to-do list since we merged https://github.com/ipfs-shipyard/ipfs-share-files/issues/108, but community contributions on this are more than welcome! 🙏 Please comment in this issue with any questions, or to let us know when you get started. Thanks!
Adds to the existing PWA functionality by allowing page to be listed in the share sheet on Android, ChromeOS and more OS are interested and heading this direction.
https://web.dev/web-share-target/