njosefbeck / gatsby-source-stripe

Gatsby source plugin for building websites using Stripe as a data source
74 stars 17 forks source link

Images not downloaded for Price objects #62

Closed kbravh closed 3 years ago

kbravh commented 3 years ago

Prerequisites

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

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.

njosefbeck commented 3 years ago

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