njosefbeck/gatsby-source-stripe

Images not downloaded for Price objects

Closed this issue · 1 comments

Prerequisites

[X] Put an X between the brackets on this line if you have done all of the following:

  • Read through the README fully.
  • Ensured you are running Node v.10 or above.
  • Made sure you're using at least Gatsby v.2.0.15.
  • Checked that your issue isn't already filed.

Describe the bug
Images are not downloaded for Price objects even when the downloadFiles is set to true.

To Reproduce
Steps to reproduce the behavior:

  1. Add the source plugin
  2. Set objects to ["Price"]
  3. Set downloadFiles to true.

Expected behavior
Images should also be downloaded for products based on the new Prices API setup.

Versions (please complete the following information):

os: Linux (Pop!_OS 20.04)
node: 14.13.1
npm: 6.14.8
gatsby: 2.12.109
gatsby-source-stripe: 3.1.1

Gatsby config:

Copy the portion of your Gatsby config for this plugin here. Do not include your secretKey.

{
      resolve: `gatsby-source-stripe`,
      options: {
        objects: ["Price"],
        secretKey: process.env.STRIPE_SECRET_KEY,
        downloadFiles: true,
      },
}

Additional context
I can force the images to download by adding case "price" following the same path as case "sku" to both downloadAndAddTo() in the FileDownloadService.js and to extractUrls() in extractUrls.js. I'm not sure if there are any further changes necessary for full integration.

This is now live on npm, so closing this issue! Feel free to re-open if you experience any issues.