# CSV Export zu Google Cloud Plattform Bucket

**URL:** <https://forum.shopware.com/t/csv-export-zu-google-cloud-plattform-bucket/86542>\
**Category:** Programmierung\
**Created:** [29. März 2021 um 08:34 UTC](https://forum.shopware.com/t/csv-export-zu-google-cloud-plattform-bucket/86542 "2021-03-29T08:34:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![steven.wenzel](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@steven.wenzel](https://forum.shopware.com/u/steven.wenzel)\
**Post date:** [29. März 2021 um 08:34 UTC](https://forum.shopware.com/t/csv-export-zu-google-cloud-plattform-bucket/86542/1 "2021-03-29T08:34:15Z")

</div>

Hallo zusammen,

ich würde gerne meine exportierten CSV-Dateien aus dem Import-Export-Modul auf einem Google Cloud Bucket speichern. Ich verwende die Shopware-Version 6.3.5.1 und die Adapter sind entsprechen über die shopware.yml konfiguriert. Das funktioniert auch abgesehen vom Import-Export-Modul.  
Folgender Fehler wird mir angezeigt:  
PHP Warning: stream\_copy\_to\_stream(): supplied resource is not a valid stream resource

Das Problem scheint zu sein, dass der GCP-Adapter Guzzle zum upload verwendet. Guzzle schließt nach dem ersten Chunk die resource und kann bei der folgenden iteration nicht mehr darauf zugreifen.

Gibt es jemanden mit dem gleichen Problem oder gar eine Lösung dafür?

---

<div class="post-metadata">

**Author:** ![trolink](https://avatars.discourse-cdn.com/v4/letter/t/a183cd/32.png) [@trolink](https://forum.shopware.com/u/trolink)\
**Post date:** [23. August 2022 um 06:15 UTC](https://forum.shopware.com/t/csv-export-zu-google-cloud-plattform-bucket/86542/2 "2022-08-23T06:15:35Z")

</div>

Hi @steven.wenzel

hast du dafür eine lösung gefunden? Danke!

---

<div class="post-metadata">

**Author:** ![steven.wenzel](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@steven.wenzel](https://forum.shopware.com/u/steven.wenzel)\
**Post date:** [23. August 2022 um 07:56 UTC](https://forum.shopware.com/t/csv-export-zu-google-cloud-plattform-bucket/86542/3 "2022-08-23T07:56:18Z")

</div>

Hi @trolink ,

sorry ich weiß es leider nicht mehr. Ich bin auch leider schon länger nicht mehr in dem Projekt. Ich hatte dazu aber zwei issues geöffnet:

> <https://github.com/shopware/platform/issues/1747>
>
> \*\*Description\*\*  
> The Shopware-Export-Module throws the following warning when …I use the Google Cloud Storage adapter:
> \`PHP Warning: stream\_copy\_to\_stream(): supplied resource is not a valid stream resource\`
> The problem is, this adapter uses Guzzle to upload the file/chunk and Guzzle closes the resource. The next upload iteration/loop is not able to use this resource again.
> 
> \*\*Possible Solution\*\*  
> A possible solution could be to add a \`$this-\>initTempFile();\` in Shopware\\Core\\Content\\ImportExport\\Processing\\Writer\\AbstractFileWriter.php Line 49

> <https://github.com/shopware/production/issues/102>
>
> The following nginx location rule bypasses the shopware route \`/store-api/produc…t-export/{accessKey}/{fileName}\`, when fileName its a xml file
> 
> https://github.com/shopware/production/blob/78b42e8ad9f1f541bdda2f6df8e4f07805447bd3/config/etc/nginx/nginx.conf#L74

Ich hoffe das hilft dir irgendwie weiter.
