ergonode / exporter-shopware-6-backend

Ergonode - Exporter Shopware 6
Open Software License 3.0
2 stars 12 forks source link

Prevent downloading images when building product #31

Open kardi31 opened 3 years ago

kardi31 commented 3 years ago

Bug type

Architecture

Current behavior

When Ergonode is building products & synchronising product images, it downloads remotely whole image content. The content is not used at all, but it takes a lot of time to download the image through API (10sec/image in our case).

Input Code

https://github.com/ergonode/exporter-shopware-6-backend/blob/main/src/Infrastructure/Client/Shopware6ProductMediaClient.php#L150

Expected behavior

Do not download image through API. Ergonode as PIM should be a source of truth, we should not care about the content of image on remote server.

Possible Solution

When sending GET request to remote server, all we need to verify is whether response is successful & not empty. We should ignore the content of image.

Environment


Ergonode version: 1.0.1


Detailed information:
- PHP version:  7.4

Others:

cc @wfajczyk @piotrkreft