Closed mrmikardo closed 2 years ago
Hello! So as per our README, users do have the ability to download the files, which then I assume these downloaded files could be passed to other plugins, but I don't have a lot of insight in that area as I wasn't the creator of that download feature within this plugin.
Feel free to give it a whirl and see if it does what you need! And if it does, we always encourage README additions to help guide other users that might have the same question / thought. And if it doesn't, feel free to update the plugin as needed and create a PR for review! There are some instructions on how to get the plugin running locally in the README; I'd also be happy to help debug any issues you might run into getting it spun up locally.
Thanks!
The person who implemented the downloadFiles feature also created this gatsby-stripe-starter, which might integrate with gatsby-plugin-stripe
as well / have an example you could look at: https://github.com/brxck/gatsby-starter-stripe. Just thought I'd mention in case it's helpful!
@njosefbeck thanks for the swift reply! 🙇
I've had a play with the downloadFiles
- this does pretty much exactly what I need! So I reckon this issue can be considered closed.
Happy to help, and glad that that worked for you!
Any GraphQL File object that contains an image has a
childImageSharp
field that you can query and pass to Gatsby image components (usinggatsby-plugin-image
). It would be very cool if it were possible to do the same thing withgatsby-source-stripe
when retrieving Product images. This would allow seamless interaction between thegatsby-image-plugin
andgatsby-stripe-plugin
to display product images.At present, querying for the
image
field on a product returns something like the following;i.e. an array of links that can be used to download the image file. Somehow you'd need to convert this to a File(-like?) object so that GraphQL /
gatsby-plugin-image
could expand an associatedchildImageSharp
field. From a glance, it looks like it might be possible to use theFileDownloadService
class to do this?Docs for
gatsby-plugin-image
: https://www.gatsbyjs.com/plugins/gatsby-plugin-image