In a discussion regarding the development of an app connection to post to the forum, fmckinnon asks if it is possible to share images from a third-party mobile hunting trail cam app directly into the Discourse community, aiming to build their community outside of Facebook. Falco explains that while Discourse currently allows sharing text via the Share Target API, file sharing is blocked due to a missing route controller. He proposes creating a new route to handle file shares, potentially using a service worker or the Discourse Hub app. pmusaraj clarifies that users can already manually select and upload images from their devices (including SD cards) when replying or creating topics via the Discourse Hub app, Chrome, or an Android PWA, provided they are authenticated. However, he acknowledges that a streamlined process using the Share Target API for Android would be beneficial, though it may be trickier for iOS due to the Hub app’s ability to link to multiple sites. Falco specifies he is looking for the direct OS share sheet functionality, which pmusaraj confirms is not yet implemented in the iOS app. Falco reiterates the need for an Ember route that accepts files and registers PWAs and Discourse Hub as share targets. The discussion references a related thread about Android sharing issues here.
We are building a community on Discourse that is based around hunting, fishing, etc. Our users post pictures of their hunts, fish they caught, etc.
We are working on an app that integrates with a mobile hunting trail cam viewer. In the development of the app, one of the features we’d like to have is the ability to share images from your SD Card (that is inserted into our mobile SD card reader) into our forum.
I see people do this easily with share on Facebook, but we’re trying to build our community OFF of Facebook.
Is this possible?
What would an app designer need in order to configure the ability to share pictures from a 3P mobile app into the community?
It is on my list to allow other apps to share images to using the Share Target API v2. We currently allow other apps to share to Discourse text, and it works just fine but we block files from being shared since we lack the necessary route controller.
Now that I’m thinking about this, I wonder if we can create this new route and share it between platforms, where you share to a service worker (everywhere) or to our Discourse Hub app (iOS). What do you think @pmusaraj?
Currently a user can pick any image on their device (including ones saved on an SD card) and share it in a Discourse forum, either through our DiscourseHub app or using the site in Chrome or in an Android PWA. They need to be authed to the Discourse site, and upload the files when replying or creating a new topic. So this basic functionality is already there.
But, yes, we could provide a more streamlined process using the Share Target API for Android (it’s probably possible, but trickier for iOS, given that the Discourse Hub app can be linked to multiple Discourse sites).