Skip to content

Commit 00090ea

Browse files
committed
B2B-2048: [AWS S3] ImportExport can't unzip file from AWS S3
1 parent 423d22e commit 00090ea

File tree

1 file changed

+3
-2
lines changed
  • app/code/Magento/ImportExport/Model/Import/Source

1 file changed

+3
-2
lines changed

app/code/Magento/ImportExport/Model/Import/Source/Zip.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ class Zip extends Csv
2323
public function __construct(
2424
$file,
2525
\Magento\Framework\Filesystem\Directory\Write $directory,
26-
$options
26+
$options,
27+
\Magento\Framework\Archive\Zip $zipArchive = null
2728
) {
28-
$zip = ObjectManager::getInstance()->create(\Magento\Framework\Archive\Zip::class);
29+
$zip = $zipArchive ?? ObjectManager::getInstance()->get(\Magento\Framework\Archive\Zip::class);
2930
$csvFile = $zip->unpack(
3031
$file,
3132
preg_replace('/\.zip$/i', '.csv', $file)

0 commit comments

Comments
 (0)